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 + ...
VahidDM
4 years agoSuper User
Hi kenneth0596
How did you calculate 2 as a Percentage for category 2?
If that 2 is wrong, please try this measure:
Percent% =
VAR _Rev =
MAX ( 'Table'[Revenue] )
VAR _Fee =
CALCULATE (
SUM ( 'Table'[Fee] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = MAX ( 'Table'[Category] ) )
)
RETURN
_Rev / _Fee
output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
kenneth0596
4 years agoFrequent Visitor
Thank you for your response.
I tried your measures but the calculate filter did not group the fee by category. VAR_Fee is still giving me the same result as Fee.