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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors