Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
jcastr02
Post Prodigy
Post Prodigy

quick measure total points

I have two columns -   1.  Total Points  2. Max Total Points     How can I get a measure to get an average of points     (total points / Max total points)   

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @jcastr02 

You could use AVERAGEX Function to create a measure like below:

https://docs.microsoft.com/en-us/dax/averagex-function-dax

 

= AVERAGEX('Table', DIVIDE(CALCULATE(SUM('Table'[Total Points])),CALCULATE(SUM('Table'[Max Total Points]))))

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-lili6-msft
Community Support
Community Support

hi  @jcastr02 

You could use AVERAGEX Function to create a measure like below:

https://docs.microsoft.com/en-us/dax/averagex-function-dax

 

= AVERAGEX('Table', DIVIDE(CALCULATE(SUM('Table'[Total Points])),CALCULATE(SUM('Table'[Max Total Points]))))

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lili6-msft   I tried to do this, but when I put in visual in gave me error....here is sample data, not sure if this helps....I would want the score to show the roll up of the team members overall score (of all modules).....

 

sample data.png

So a measure like:

SUM([Total Points]) / SUM([[Max Total Points])
?
What kind of visualization are you using and what are you putting in that visualization?

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@v-lili6-msft   using a gauge visual, see below....

 

gauge.png

hi @jcastr02 

I hve test on my side, it works well.

3.JPG

here is my sample pbix file, please try it.

If possible, could you please share your sample pbix file and your expected output for us have a test?

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Disregard , this worked it was how my data type was set up, thanks so much! @v-lili6-msft 

@v-lili6-msft     If I use a line chart, the number tends to stay consistent,  if I use a gauge chart, there is only that one roll up value, so it works... 

 

score.png

Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@jcastr02 

Can you share sample data and sample output. You can have the calculation like this

 


Calculate(Average(Table[Total Point]))

Calculate(divide(sum(Table[Total Pont]),sum(Table[max Point])))

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.