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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Han_Solo
Helper I
Helper I

Two value slicers applied to two measures - one table

1.PNG

I have a problem with two measures. Whole thing is I have a table with plenty of columns with values from 0 to 100 with difference by 0.01. Like on the picture

 

 

 

Whole thing is I want to use in the raport two slicers ( one based od column A and the another based on column B in one table) and then use two measures. One measure should show the biggest value from the one slicer, and another one should show the biggest value from another slicer. 

2.PNG

So here we have:

test 1 is 

test 1 = SELECTEDVALUE(Parameters[Cost], MAX(Parameters[Cost]))

test 2 is

test 1 = SELECTEDVALUE(Parameters[Spend], MAX(Parameters[Spend]))

so I tried to use ALLSELECTED but it applies only to filters inside the query and i tried to use ALL but it doesn't work at all the way I want. 
test 4 is

test 4 = 
    VAR _table = ALL(Parameters)
    RETURN
CALCULATE (MAXX(_table, Parameters[Cost]))

so test 4 basically takes the biggest value of all in the column so its 100. I wanted test 1 to apply to slicer 1 only and test 2 to apply to test 2 slicer only. Because now the valid slicer is this one which has smaller number (which is understandable because that creates context)

I figured out what should I do in test 3

test 3 = 
var tmpTable = ALL(Parameters)
var mxNumber = MAXX(Help_Table, Help_Table[numbers])
RETURN
CALCULATE (MAX(Parameters[Spend]), FILTER(tmpTable, Parameters[Spend] <= mxNumber))

But to do this, to have independent slicer that works only on one measure I need to have slicer based on the auxiliary table. Is there a way to not create auxiliary table? 

 

Thank you and best regards 

 

1 REPLY 1
Icey
Community Support
Community Support

Hi @Han_Solo ,

If you want the two slicer do not affect each other, you need to create another table that is unrelated to the first table. Slicers will filter Data Model. So, if two slicers come from one table,  they will affect each other. This is an article explains detailed.

 

Best Regards,

Icey Zhang

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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