Forum Discussion
Percentage on Subcategory
Hello everyone,
I want to create a subcategory percentage but something goes wrong.
I found some related solutions but it looks like they are not working because I have measured instead of the calculated column.
I wrote a dax like this
any idea?
Thanks in advance!
v-kkf-msft thank you! thumb up for your solution!
My solution at the end
Ar_SubCat_% =VAR NumA = IF( ISBLANK( table1[measure2]), BLANK(), CALCULATE(table1[measure2], ALLSELECTED(Calendar_System[DateBand]) ) )VAR NumB = table1[measure2]VAR div22 = DIVIDE(NumB, NumA, 0 )Return div22
4 Replies
- v-kkf-msftCommunity Support
Hi SpiroswayGR ,
Please create these measures.
Measure 2 = SUM ( Calendar_System[Value] )%per category = DIVIDE ( [Measure 2], CALCULATE ( [Measure 2], VALUES ( Table1[Agent] ), ALL () ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - SpiroswayGRResolver III
any correction for this dax? maybe change sumx to sum ?
- SpiroswayGRResolver III
thumb up for solution 😄
- SpiroswayGRResolver III
v-kkf-msft thank you! thumb up for your solution!
My solution at the end
Ar_SubCat_% =VAR NumA = IF( ISBLANK( table1[measure2]), BLANK(), CALCULATE(table1[measure2], ALLSELECTED(Calendar_System[DateBand]) ) )VAR NumB = table1[measure2]VAR div22 = DIVIDE(NumB, NumA, 0 )Return div22