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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Super User
Super User

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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