Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I'm trying to calculate the percentage for each color based on the total amount they have for a selected week. SUM(myTable[Color] gives me the correct amount of seconds for each category, and so now I was trying to find a way to calculate the total amount of seconds without considering the category, to obtain a percentage, but the percentage I obtain is far from 100%. How would I/should I proceed to obtain the percentage by color in that situation?
Hi! You would want to make a measure that ignore the context of category (and or whatever else you may want to show that data by so that you can obtain your denominator). I also suggest making an explicit measure for SUM(myTable[Color]) if you don't already have one.
Measure =
DIVIDE(
SUM('myTable'[Color],
CALCULATE(
SUM('myTable'[Color]),
ALL('myTable')
)
)
If you want the measure to only ignore some filters, but not all (for example, if you want the date filter to not be ignored), use ALLEXCEPT instead of ALL. ALLEXCEPT function (DAX) - DAX | Microsoft Learn
Proud to be a Super User! | |
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
81 | |
70 | |
49 |
User | Count |
---|---|
143 | |
124 | |
107 | |
60 | |
55 |