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,
Let's say that I have the following table:
Fruit | Color | Retailer |
Orange | yellow | Safeway |
Apple | Green | Farmer's Market |
Apple | red | Safeway |
Apple | Green | Safeway |
Kiwi | red | Farmer's Market |
Kiwi | Green | Safeway |
Now I want to calculate the color occurence rate for Green, with the following calculation:
Occurence rate = #(occurences of Green)/#(occurences of all the fruits that at some point were green with the rest of the filters except for green applied).
For example if Green is selected the Occurence rate should be = 3 (Green)/( 2(Kiwi)+ 3(Apple))
but if also Farmer's Market is selected the Occurence should be = 1 (Green)/3 (Apple), as there are no Green Kiwis in Farmer's Market.
How can I do this?
@Anonymous @vivran22 Thank you for the feedback!
I updated the post with a calculation. Let me know if you need anything else.
Hello @sundayDriver ,
Need more clarity on the requirement/output, especially the denominator.
For the example mentioned:
occurences of Green = 3
What do you mean by "occurences of all the fruits that at some point were green with the rest of the filters except for green applied"?
What will be the count in the example?
Cheers!
Vivek
https://www.vivran.in/
Connect on LinkedIn
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 |
---|---|
46 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
65 | |
50 | |
45 | |
20 | |
17 |