Forum Discussion
Calculate percent based on multiple columns
- 4 years ago
Hi Anonymous ,
IF the "Mat Nr Count" is a measure, you can modify M like this.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
According to your description, here's my solution.
M =
VAR _CURRENTDATA =
CALCULATE ( SUM ( 'dummy data'[Mat Nr Count] ) )
VAR _Total =
SUMX (
FILTER (
ALL ( 'dummy data' ),
'dummy data'[MARA-MTART] = MAX ( 'dummy data'[MARA-MTART] )
&& 'dummy data'[LOCATIONTYPE] = MAX ( 'dummy data'[LOCATIONTYPE] )
&& 'dummy data'[LOCATIONID] = MAX ( 'dummy data'[LOCATIONID] )
),
'dummy data'[Mat Nr Count]
)
RETURN
DIVIDE ( _CURRENTDATA, _Total )
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I can see your solutions works perfect on the dummy data - very impressive!
I do have one question as I've made a mistake when I did the dummy pbix file.
The "Mat Nr Count" is a calculated measure:
Once again: Thank you so much! 🙂
- v-yanjiang-msft4 years ago
Community Support
Hi Anonymous ,
IF the "Mat Nr Count" is a measure, you can modify M like this.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Thank you very much! 🙂