March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |