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.
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 using the Amount column. So for the first Order Number (22), I got the percentage 50% for Boxes, 25% for Tables, and 25% for Chairs, so that's 100% total based on the Order Number column and then the other Order Number are the same. Thank you
Solved! Go to Solution.
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] ) )
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@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.
Hi,
Thank you for your message.
Could you please change ALL to ALLSELECTED in the measure, and check whether it suits your requirement?
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Jihwan_Kim Thank you so much. I have one more question. How can I get the average instead of the percentage?
Hi,
Thank you for your message.
Please check the attached file.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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] ) )
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
114 | |
105 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |