Forum Discussion
kenneth0596
4 years agoFrequent Visitor
Dax Calculate Filter
Hi, I have a simple DAX question, see below table. Im trying to calculate the percentage by dividing Revenue by Fee by Category. For example, Revenue is 1000 for Category 1 and Fee is 600 (100 + ...
YukiK
4 years agoImpactful Individual
Your Measure =
VAR __Rev =
CALCULATE(
MAX(YourTable[Revenue]),
ALLEXCEPT(YourTable, YourTable[Category])
)
VAR __Fee =
CALCULATE(
SUM(YourTable[Fee]),
ALLEXCEPT(YourTable, YourTable[Category])
)
RETURN
DIVIDE(__Rev, __Fee)
Please give it a thumbs up if this helps!
kenneth0596
4 years agoFrequent Visitor
Thanks Yukik, it did compute the percentage correctly but when I dropped it into the table, it returned multiple duplicate rows like department a, a, a, b, b, c, c.
I forgot to mention that I have a page filter.