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
pani_victoria
Helper I
Helper I

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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