March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Let's say I have two slicers. The first slicer consists of Month Names and the other slicer will contain "Weekly", "Monthly", "Yearly".
So if I select only one month in the month names slicer, the other slicer should only show me the Weekly option
And if I have 4 months selected in the months slicer then the other slicer should show Weekly and Monthly
That's basically the whole idea, is something like this actually possible in Power bi?
Solved! Go to Solution.
Hi @RingoSun ,
Here are the steps you can follow:
1. Create measure.
Flag =
SWITCH(
TRUE(),
COUNTROWS(VALUES('Table'[Monthyear]))=1&&SELECTEDVALUE('Table2'[Slicer])="Week",1,
COUNTROWS(VALUES('Table'[Monthyear]))>=4&& OR( SELECTEDVALUE('Table2'[Slicer])="Month",SELECTEDVALUE('Table2'[Slicer])="Week"),1,
COUNTROWS(VALUES('Table'[Monthyear]))>=2&&SELECTEDVALUE('Table2'[Slicer])="Month",1,
0)
2. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @RingoSun ,
Here are the steps you can follow:
1. Create measure.
Flag =
SWITCH(
TRUE(),
COUNTROWS(VALUES('Table'[Monthyear]))=1&&SELECTEDVALUE('Table2'[Slicer])="Week",1,
COUNTROWS(VALUES('Table'[Monthyear]))>=4&& OR( SELECTEDVALUE('Table2'[Slicer])="Month",SELECTEDVALUE('Table2'[Slicer])="Week"),1,
COUNTROWS(VALUES('Table'[Monthyear]))>=2&&SELECTEDVALUE('Table2'[Slicer])="Month",1,
0)
2. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @RingoSun ,
I created some data:
Table:
Table2:
Here are the steps you can follow:
1. Create measure.
Flag=
SWITCH(
TRUE(),
COUNTROWS(VALUES('Table'[Monthyear]))=1&&SELECTEDVALUE('Table2'[Slicer])="Week",1,
COUNTROWS(VALUES('Table'[Monthyear]))>=2&&SELECTEDVALUE('Table2'[Slicer])="Month",1,
0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Choose one:
Choose four:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi there, what changes can I make here to make it so that if I have four months selected, it would show both Week and Month
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |