Forum Discussion
Calculating total value from a measure
Hello everyone!
I'm currently struggling with a slight issue I've been working on. I'm trying to calculate the total value of a measure that I've created with Filters but it doesn't seem to calculate the total value.
I've created a measure that shows each users average test scores. Now, I'd like to represent those by creating cards which show the total amount of users who have got 40%, 90% etc... If that makes sense?
My current measure is -
if%trained = IF([%Trained] = 0.4, "1" )
It references my initial measure and then I wanted to say that any users with 0.4 / 40% for their score, give them a '1' value and then calculate the total value of these to give me a total number of users who have that score.
I've added an image below to show my current status. I'd just like to be able to get a total value for the student list, so that I could create a card with the total amount of users. I would then add a few different cards to represent the scores that users could get at a glance.
Thank you for all of your help 🙂
2 Replies
- Greg_Deckler
Community Champion
JonBonesJones First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8This may also be what you are looking for:
This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.- JonBonesJonesFrequent Visitor
Hi Greg! Thank you very much for your post! It's definitely helped give me a lot of ideas 🙂 The issue with the measures not adding as a Sum within a Table visualization is very annoying, although your explanation did help me understand it.
I'm currently trying to sort a workaround as a solution - My issues stem from a lot of my current data has had to be created from Measures, as the data I have on the backend isn't great, so it's difficult for me to reference Tables and Columns. It was mainly just trying to get a Total value, so I could create a card visual to display the data a little bit easier for users. I'll see how it goes, hopefully I can find a solution.
Thank you for your posts though, they're very informative and helpful and been really useful 🙂