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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ybicalways79
Frequent Visitor

DAX Measure to filter Multiple DataSets in Visuals - Power Bi

Ive been at this a week now with little progress and lot of frustration.

 

I have 2 slicers is my projects which are both shows here in the left corner.  When I select a Visual Category, I would like the cooresponding Sales by the related Route code.  Example, I click on "A Route Time" and the line in the graph only shows A routes.  I select "C Route Efficiency (72%)" and i see only sales for C Routes.  Now if i select "Open Pickups", I was to see a sum of all sales (A,B,C, Blank, etc).  Would anyone be able to show me the proper DAX functions and structure?

 

ybicalways79_1-1687559821353.png

 

[Visual Category} is my table for my slicer

 

ybicalways79_4-1687560761573.png

 

Here is a sample [Sales] table that has direct relationship to the table above based on Route.  Some route letters will not match example D, E or U.  Some will be blank.

 

ybicalways79_3-1687560080836.png

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @ybicalways79 ,

 

I suggest you to remove or inactive the relationship between two tables. Then create measures to get result.

Select Category Price = 
VAR _SELECTEDALUE =
    SELECTEDVALUE ( 'Visual Category'[SalesRounteMatch] )
RETURN
    IF (
        ISFILTERED ( 'Visual Category'[Matched Categories] ),
        IF (
            _SELECTEDALUE = BLANK (),
            CALCULATE ( SUM ( Sales[Price] ) ),
            CALCULATE ( SUM ( Sales[Price] ), Sales[Route] = _SELECTEDALUE )
        )
    )

Result is as below.

vrzhoumsft_0-1687757636623.pngvrzhoumsft_1-1687757645298.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@Anonymous
Short answer is your solution was great.  Now my issue that i didnt provide you enough infomation and tables.  I attempted to use what you suggested to fix but i could not get it to work.  I included a link to the .pbix

 

https://1drv.ms/u/s!Ape6tOFImQ6qg6JEOlNaI5o7GMXI5w?e=QNV4c4

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.