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.
Hi friends,
Simple question, I just don't know the correct DAX:
I have a table like the one above and want to ADD COLUMN which shows the result as above. The column shall calculate the percentage based on the attributes in the column Receipe.
Help! Thanks a thousand times!
Solved! Go to Solution.
Hi, @I_LOVE_POWER_BI
Please check the below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
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 @I_LOVE_POWER_BI ,
You can create a calculated column
In % =
var total=CALCULATE(SUM(Data[Weight]),ALLEXCEPT(Data,Data[Receipe]))
return DIVIDE(Data[Weight],total,0)
And create a matrix like this
In case you want to use two columns and create a table then you can use calculated columns as shown below:
In % =
var total=CALCULATE(SUM(Data[Weight]),ALLEXCEPT(Data,Data[Receipe]))
return DIVIDE(Data[Weight],total,0)
Total % = CALCULATE(SUM(Data[In %]),ALLEXCEPT(Data,Data[Receipe]))
and then create a table to get the desired result
Hope this helps !!
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Hi, @I_LOVE_POWER_BI
Please check the below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
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.
Thanks Jihwan, it works! I did the same but I used ALL instead of ALLEXCEPT and got an error. Can you help me to understand what is the difference here?
Thanks!
Hi, @I_LOVE_POWER_BI
Thank you for your feedback.
In my opinion, the All function clears all filters in the table. Allexcept function clears all filters except a certain column. In this case, the certain column is, I think, the Recipe column, and this column has to filter the formula.
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 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |