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
Aishwaryazanpur
Frequent Visitor

Combine 2 indiviual slicers and use the result as a single slicer

Dear all,

I want to show current and proposed state of the depot, for that,  I am making use of 2  slicers with the following conditions:

1 st slicer: channels in depot (with 0,1,2,3 as options to select from) 2. assigned (short, long, null as options)

 

conditions

current state  : channels in depot >0 and assigned can be short / long / null (this combination is needed to depict current state)

proposed state : channels in depot =0 and assigned = short /long

 

Currently, I am using channels in depot and assigned as 2 different slicers can I combine these 2 slicers in to 1 (by caculated column / measure ) as use result as single slicer

 

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @Aishwaryazanpur 

You can create a new table

Table = var a=SELECTCOLUMNS(GENERATESERIES(0,4,1),"num",[Value])
var b={"long","short","null"}
return GENERATE(a,b)

Then create a measure

Measure = var a=FILTER('Table',[num]>0&&[Value] in VALUES('Table'[Value]))
return IF(SELECTEDVALUE('Table'[num])>0&&SELECTEDVALUE('Table'[Value]) in VALUES('Table'[Value]),1,IF(SELECTEDVALUE('Table'[num])=0&&SELECTEDVALUE('Table'[Value]) in {"long","short"},1,0))

Then create a slicer and put the field to the slicer

vxinruzhumsft_0-1697683564886.png

 

and put the measure filter to the slicer

vxinruzhumsft_1-1697683592149.png

 

Output

vxinruzhumsft_2-1697683620298.png

 

 

Best Regards!

Yolo Zhu

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

View solution in original post

2 REPLIES 2
Aishwaryazanpur
Frequent Visitor

Thank you so much!

v-xinruzhu-msft
Community Support
Community Support

Hi @Aishwaryazanpur 

You can create a new table

Table = var a=SELECTCOLUMNS(GENERATESERIES(0,4,1),"num",[Value])
var b={"long","short","null"}
return GENERATE(a,b)

Then create a measure

Measure = var a=FILTER('Table',[num]>0&&[Value] in VALUES('Table'[Value]))
return IF(SELECTEDVALUE('Table'[num])>0&&SELECTEDVALUE('Table'[Value]) in VALUES('Table'[Value]),1,IF(SELECTEDVALUE('Table'[num])=0&&SELECTEDVALUE('Table'[Value]) in {"long","short"},1,0))

Then create a slicer and put the field to the slicer

vxinruzhumsft_0-1697683564886.png

 

and put the measure filter to the slicer

vxinruzhumsft_1-1697683592149.png

 

Output

vxinruzhumsft_2-1697683620298.png

 

 

Best Regards!

Yolo Zhu

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.