Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I will have Item Levels as below. Every Item has sales entries with QTY & Amount.
I may use PAGE FILTERS / SLICERS to First Filter
I want to know Matrix / Chart / PIE showing PERCENT Contribution of
CATEGORY | PRODUCT GROUP | ITEMS |
A | FRUITS | APPLE |
ORANGE | ||
MELON | ||
VEGETABLES | CABBABGE | |
LEMON | ||
TOMATO | ||
CARROT | ||
PP3 | ||
B | TV | SONY |
LG | ||
SAMSUNG | ||
TOSHIBA | ||
TLC | ||
PHILIPS | ||
PPB2 | ||
PPB3 | ||
PPB5 |
Thanks in Advance for your advices.
Solved! Go to Solution.
Hi @HKSpring ,
Please try the measure.
Measure =
VAR PG_Total =
CALCULATE (
SUM ( 'Table'[SALES] ),
ALL ( 'Table'[ITEMS] )
)
RETURN
DIVIDE ( SUM ( 'Table'[SALES] ), PG_Total )
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.
Hi @HKSpring ,
Please try the measure.
Contribution % =
VAR Total =
CALCULATE ( SUM ( 'Table'[SALES] ), ALLSELECTED () )
VAR PG_Total =
CALCULATE (
SUM ( 'Table'[SALES] ),
ALLSELECTED (),
VALUES ( 'Table'[CATEGORY] )
)
VAR Items_Total =
CALCULATE (
SUM ( 'Table'[SALES] ),
ALLSELECTED (),
VALUES ( 'Table'[PRODUCT GROUP] )
)
RETURN
SWITCH (
TRUE (),
ISFILTERED ( 'Table'[ITEMS] ), DIVIDE ( SUM ( 'Table'[SALES] ), Items_Total ),
ISFILTERED ( 'Table'[PRODUCT GROUP] ), DIVIDE ( SUM ( 'Table'[SALES] ), PG_Total ),
DIVIDE ( SUM ( 'Table'[SALES] ), Total )
)
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.
Dear v-kkf-msft,
Thanks for your suggestion.
I have below problem with above measure.
As you can see on above photo, if I select Product Group first ---> no more selection on Products, contribution% is correct.
-------------------------------------------------------------------------------
If I FILTER 1 Product Group ---> Then FILTER 1(or)more products from the Items
Results are wrong.
What I require is After Selecting Product Group, I like to selelct few products from the list (multi select) and compare the contributions of 10 products from that prouduct group (out of 1000s products in that product gorup). And want the contribution percentage to be not changed (if date range filter is not changed).
Thanks a lot in advance.
Hi @HKSpring ,
Please try the measure.
Measure =
VAR PG_Total =
CALCULATE (
SUM ( 'Table'[SALES] ),
ALL ( 'Table'[ITEMS] )
)
RETURN
DIVIDE ( SUM ( 'Table'[SALES] ), PG_Total )
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |