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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Br1-981
Helper I
Helper I

Filtering on calculated measure

Hi,

I have a created a report where I have 2 main tables (to simpilify) SALES and COSTS where the main entity for both is "BRAND":

Br1981_0-1708340445620.png

To connect the two I have a created a custom table:

UNIQUE_BRAND = DISTINCT(SALES[BRAND])

 

Then I have created 2 calculated measures:

MYCOMPANY_SALES = CALCULATE(SUM(SALES[SALES]), SALES[BRAND]="MY COMPANY")

MARKET_SALES = SUM(SALES[SALES])

 

Because my target is to create a graph like this to compare MY COMPANY SALES vs MARKET SALES:

Br1981_1-1708340617487.png

This is working fine, issues come when I add a filter using the UNIQUE_BRAND[BRAND] I've created because I want to use it to create a subset of the market and compare MYCOMPANY vs One of more BRANDS:

Br1981_2-1708340821081.png

 

I built the UNIQUE_BRAND table since I want to the same using the COSTS table so I cannot filter directly on one table, how should I build my meausres to avoid that they got filterd correctly?

Attached there is also the PBIX: https://we.tl/t-CZ8raGjpW2

 

Thanks in advance for the help!

 

Thanks

1 ACCEPTED SOLUTION
v-jialongy-msft
Community Support
Community Support

Hi @Br1-981 

 

Change the formula for your MYCOMPANY_SALES to :

MYCOMPANY_SALES = CALCULATE(SUM(SALES[SALES]), UNIQUE_BRAND[BRAND]="MY COMPANY")

 

 

This is the result you want

vjialongymsft_0-1708396573556.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-jialongy-msft
Community Support
Community Support

Hi @Br1-981 

 

Change the formula for your MYCOMPANY_SALES to :

MYCOMPANY_SALES = CALCULATE(SUM(SALES[SALES]), UNIQUE_BRAND[BRAND]="MY COMPANY")

 

 

This is the result you want

vjialongymsft_0-1708396573556.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors