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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pani_victoria
Helper III
Helper III

filter by brand, but not by brand

Hello! Please, need help!

I have 2 tables, they are linked by ID.
I need to get a table that will show the sales of all Brands, where the BrandFolders is the same as the selected Brand.

Снимок1.JPG

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

https://1drv.ms/u/s!AiUZ0Ws7G26RilEzzrIAb4-H2GLg?e=rKuktf

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem in the attached file.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

https://1drv.ms/u/s!AiUZ0Ws7G26RilEzzrIAb4-H2GLg?e=rKuktf

I duplicate the formula here:

Create 
Slicer = VALUES(DIRECTORY[Brand])
and then create a measure
Final =
VAR _selectBrand = VALUES( Slicer[Brand] )
VAR _SelectBrandFolder =
    SELECTCOLUMNS(
        FILTER( ALL( DIRECTORY ), DIRECTORY[Brand] IN _selectBrand ),
        "Folder", DIRECTORY[BrandFolder]
    )
RETURN
    CALCULATE( [Amo], KEEPFILTERS( _SelectBrandFolder ) )

Many thanks, good man! You helped me a lot! 🤓

devesh_gupta
Impactful Individual
Impactful Individual

Create a DAX measure that calculates the sales for the selected Brand like:

SelectedBrandSales =
CALCULATE(
SUM(Sales[Sales]),
FILTER(ALL(Directory), Directory[BrandFolders] = SELECTEDVALUE(Directory[BrandFolders]))
)

 

Then you can create a table visual to display the sales.

Your solution was also useful, but later 🙂 Thanks!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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