Forum Discussion
How to calculate Dynamic DAX?
I am using this DAX to calculate My Sales Volume:
10 Replies
- rajulshahResident Rockstar
- AnmolganPost Prodigy
rajulshah Below is what I require:
I need to calculate royalty for each customer group, for example in my pbix file attached in the last page there is a page level filter that I have applied, now I want to calculate royalty for only those sales volume where KOBELCO words comes, now I do have a dax currently where I multiply my royalty by overall sales volume for IMF OEM (See Sales Volume Measure), now this is bound with a spreadsheet and most of the values are coming correctly aspect some of them in the measure.
I need to calculate overall royalty for IMF OEM whereever KOBELCO name comes, now royalty changes each month hence the formula should be dynamic, attached here the spreadsheet and powerbi files:
- rajulshahResident Rockstar
I hope the following DAX helps you.
Sales Volume = VAR Test = SELECTEDVALUE('Month Wise Royalty'[Customer Group Name]) VAR Royalty = CALCULATE(SUM('Month Wise Royalty'[Royalty]),FILTER(ALL(ZSD_MAT_MARGIN_Q003[Material.Material Level 01]),CONTAINS(ZSD_MAT_MARGIN_Q003,ZSD_MAT_MARGIN_Q003[Material.Material Level 01],"KOBELCO")),FILTER('Month Wise Royalty','Month Wise Royalty'[Customer Group Name] = Test)) RETURN CALCULATE(SUM(ZSD_MAT_MARGIN_Q003[Sales Volume KL]) * Royalty, FILTER('Month Wise Royalty', 'Month Wise Royalty'[Customer Group Name]= Test))
- v-juanli-msftCommunity Support
Hi Anmolgan
Is this problem sloved?If it is sloved, could you kindly accept it as a solution to close this case?If not, please feel free to let me know.Best RegardsMaggie- AnmolganPost ProdigyThis is still not solved.