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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
alexpantex
Frequent Visitor

calculate ratio on some intermediate/filtered table

Hi everyone,

 

I have one doubt that I'm not currently able to solve.

Let's say that I have a following table imported:

CategoryManufacturerBrandSales
AM1B11
AM2B22
BM1B13
BM2B22

 

What I'd need is to calculate by Category if Manufacturer M1, for example, had greater sales than competition and calculate ratio in how manu categories it had greater sales.

For example, in Category A M1 had lower sales so I'd flag it as 0 and in Category B it had greater sales so I'd flag it as 1 and then the ratio would be 50%.

CategorySales_Flag
A0
B1

Not sure if there is a way to do this in one go, or is it possible to create intermediary table with DAX to look like this and then just use CALCULATE to create ratio?

 

Any help, hint or resource would be helpful.

 

Thanks

 

1 REPLY 1
lbendlin
Super User
Super User

That's a zero sum game unless you add the manufacturer to your output table.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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