Forum Discussion
Elmoataz
3 years agoNew Member
Percentage based on a group
Hello, I'm trying to create a column that shows the percentage based on the other columns. For example; in the picture below I got the percentage of each of the materials based on the Order number us...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file.
Percentage measure: = IF ( HASONEVALUE ( 'Order Number'[Order number] ), DIVIDE ( [Amount measure:], CALCULATE ( [Amount measure:], ALL ( Material[Materials] ) ) ) )
Elmoataz
3 years agoNew Member
Jihwan_Kim , Him Kim, now I have an issue. When I filter out anything, the percentages stay the same. For example; for order number 45, when we filter out the Boxes, we will have 1000 Amount for the chairs and 1000 Amount for the tables, and the percentages should be 50% and 50%. But when I filter out the Boxes, the percentages stay the same as 25% and 25% as I didn't filter anything. Is there a way to fix this issue? Thank you so much for all your help.
- Jihwan_Kim3 years ago
Super User
Hi,
Thank you for your message.
Could you please change ALL to ALLSELECTED in the measure, and check whether it suits your requirement?