The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have the two grapyhs below, I needed to build a seller ranking with the highest amount of unavailability by percentage
but instead of showing the individual % of each seller, it ends up adding that % to the total of all sellers, instead of just showing the % of unavailability of itself (for example, instead of keeping showing the 87% in the ranking, it displays 20.15%)
how do i fix that?
Solved! Go to Solution.
Hi @neardllx ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create two measures.
unavailability% =
var _total=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller])))
var _un=CALCULATE(MAX('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller]) && 'Table'[type]="unavailability"))
return
DIVIDE(_un,_total,0)
availability% =
var _total=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller])))
var _a=CALCULATE(MAX('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller]) && 'Table'[type]="availability"))
return
DIVIDE(_a,_total,0)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share some data, explain the question and show the expected result in a simple Table format. Once we get the correct results in a Table, we can always build a visual from it.
Hi @neardllx ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create two measures.
unavailability% =
var _total=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller])))
var _un=CALCULATE(MAX('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller]) && 'Table'[type]="unavailability"))
return
DIVIDE(_un,_total,0)
availability% =
var _total=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller])))
var _a=CALCULATE(MAX('Table'[value]),FILTER(ALL('Table'),'Table'[seller]=MAX('Table'[seller]) && 'Table'[type]="availability"))
return
DIVIDE(_a,_total,0)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
80 | |
77 | |
43 | |
39 |
User | Count |
---|---|
150 | |
117 | |
67 | |
64 | |
56 |