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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
pani_victoria
Helper II
Helper II

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.