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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Need to create slicer with 'Yes or No' type to show values in table

PFB below pic regarding the table, if click 'Yes' in slicer, the table should show 'Aug 2020' values with their corresponding values in other columns

 

If i click 'No' in slicer, the table should show rest of it, like blank values of 'Aug 2020' with their corresponding values in other columns

 

Aug 2020 is the latest month, Jul 2020 is the previous month and also we one parameter to be selected which is one the supplier key = "SW" from 6 of supplier key 

 

Pls note, must not use buttons to show case this, as this the requirement we have from client.

 

Also, while all the values in the matrix are measures, not value from data table

 

sri_sengen_0-1599481086824.png

 

6 REPLIES 6
v-xicai
Community Support
Community Support

Hi   @Anonymous ,

 

Do the suggestions from engineers make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

amitchandak
Super User
Super User

@Anonymous , Try a measure like existing measure =[Measure] , Slicers independent table use in the slicer having values Yes, No

 

if(isfiltered(Slicer[Value]) && selectedvalue(Slicer[Value]) ="No" && Max(Date[Month Year]) ="Aug 2020" , blank(), [Measure])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
ibarrau
Super User
Super User

Hi @Anonymous, you can build a custom column with a condition that will show Yes or No. I will show you and example in DAX. Add a new Calculated Column in the table that contains the dates. This new column will show "Yes" for any value in the last month of the data or "No" in any other date.

LastMonth = 
VAR last_date = MAX(Table[Date])
RETURN
IF(
    AND(
        YEAR(last_date) = YEAR(Table[Date]),
        MONTH(last_date) = MONTH(Table[Date])
    ), "Yes"
    , "No"
)

Then you can add this column to slicer.

Hope this helps,


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Now I have added another parameter which is to be selected, can you pls check again the condition and reply...

 

Aug 2020 is the latest month,

Jul 2020 is the previous month

One parameter to be added which is the supplier key need to be selected, which is Supplier key = "SW" from one of the six supplier keys

 

Also, thanks so you much for your reply regarding the first suggestion.

 

Thanks and Regards,

Sri Vignesh

Hi @Anonymous ,

 

>>One parameter to be added which is the supplier key need to be selected, which is Supplier key = "SW" from one of the six supplier keys

 

Would you like to create another slicer which contains Supplier key = "SW"  and  Supplier key = other , right ? If so, you may create calculated column like DAX below, and then put it into slicer.

 

 

Slicer_Supplier= IF(Supplier key = "SW", "SW", "Other")

 

 

Best Regards,

Amy 

Greg_Deckler
Community Champion
Community Champion

@Anonymous - You can create a disconnected table with the values

Yes

No

 

Then you can build the logic into your measure to only show August values and return blank for everything else if yes and vice versa for no.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors