Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
sundayDriver
Employee
Employee

Calculate occurence

Hi,

Let's say that I have the following table:

FruitColorRetailer
OrangeyellowSafeway
AppleGreenFarmer's Market
AppleredSafeway

Apple

GreenSafeway

Kiwi

redFarmer's Market

Kiwi

GreenSafeway

 

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?

3 REPLIES 3
sundayDriver
Employee
Employee

@Anonymous @vivran22 Thank you for the feedback!

I updated the post with a calculation. Let me know if you need anything else.

Anonymous
Not applicable

We need examples of this calculation as it's not clear at all what you mean.

Best
D
vivran22
Community Champion
Community Champion

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.