Forum Discussion
Anonymous
1 year agoNot applicable
Need help :DAX Measure
I have a sum Of Sales DAX measure in Power bi. I want show the Sales Share by Sales Sub region and Destination Office wise as Below.It should show 100% in row wise like below
| Sales 2024 share | Destin 1 | Destin 2 | Destin 3 | Destin 4 | Destin 5 | Destin 6 | Destin 7 | Destin 8 | Destin 9 | Destin 10 | Total |
| Sales subreg 1 | 17% | 1% | 10% | 10% | 12% | 10% | 10% | 10% | 10% | 10% | 100% |
| Sales subreg 2 | 15% | 1% | 12% | 9% | 10.00% | 29% | 10% | 1% | 3% | 10% | 100% |
| Sales subreg 3 | 15% | 11% | 10% | 9% | 10% | 10% | 9% | 8% | 10% | 8% | 100% |
I have Tried But It shows Like below
- Anonymous1 year ago
Thank you bhanu_gautam .
but we shoud take 100% for every Sub region row
But It shows Like belowBut we need Like below
Sales 2024 share Destin 1 Destin 2 Destin 3 Destin 4 Destin 5 Destin 6 Destin 7 Destin 8 Destin 9 Destin 10 Total Sales subreg 1 17% 1% 10% 10% 12% 10% 10% 10% 10% 10% 100% Sales subreg 2 15% 1% 12% 9% 10.00% 29% 10% 1% 3% 10% 100% Sales subreg 3 15% 11% 10% 9% 10% 10% 9% 8% 10% 8% 100%
5 Replies
- bhanu_gautamSuper User
Anonymous, Can you paste workable format of DAX rather than image
- AnonymousNot applicablebhanu_gautam Here the DAX FUnction
Share % =DIVIDE(SUM('TMR-Prev year'[ACTUAL_GROSS_SALE]),CALCULATE(SUM('TMR-Prev year'[ACTUAL_GROSS_SALE]),REMOVEFILTERS('TMR-Prev year'[DESTINATION_OFFICE_KEY], 'TMR-Prev year'[SALES_OFFICE_KEY]) -- Adjust column names),0)- bhanu_gautamSuper User
Anonymous , Try using
DAX
Sales Share % =
DIVIDE(
SUM('TMR-Prev year'[ACTUAL_GROSS_SALE]),
CALCULATE(
SUM('TMR-Prev year'[ACTUAL_GROSS_SALE]),
ALLEXCEPT('TMR-Prev year', 'TMR-Prev year'[SALES_SUBREGION_KEY])
),
0
)
- shafiz_pSuper User
Hi Anonymous Try this:
Sales Share % = DIVIDE( SUM('TMR-Prev year'[ACTUAL_GROSS_SALE]), CALCULATE( SUM('TMR-Prev year'[ACTUAL_GROSS_SALE]), ALLEXCEPT('TMR-Prev year', 'TMR-Prev year'[SALES_SUBREGION_KEY]) ), 0 )Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz