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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
NKotak_Leecare
Helper III
Helper III

Display NA in card visual when no values from slicer are selected

How to display NA in the card visual when no values are selected from the slicer visual?

 

Here is the snapshot of the slicer and the card visual where card visual needs to be NA when nothing is selected from the slicer visual. When a value is selected from the slicer visual, the card values displays the count of that value. So, when nothing is selected, it needs to display NA.

Forms Count Issue.png

 

 

Appreciate your time and support in advance :))

Cheers!

2 ACCEPTED SOLUTIONS
TheoC
Super User
Super User

@NKotak_Leecare 

 

You can use the following measure to achieve what you're after:

 

MEASURE = IF ( ISFILTERED ( Table[Column] ) , SELECTEDVALUE ( Table[Column] ) , "NA" )

Output of unselected is:

TheoC_0-1644882563412.png

Example of a selected value is:

TheoC_1-1644882583706.png

Hope this helps 🙂

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

Hi Theo,

 

It worked out. I just changed the selectedvalue to count and i got both the things i wanted.

 

MEASURE = IF ( ISFILTERED ( 'ltcdb_test ltcschema'[ReportCaption] ) , COUNT( 'ltcdb_test ltcschema'[FormID] ) , "NA" )

 

Thank you heaps for your time and support.

 

Cheers!

View solution in original post

5 REPLIES 5
TheoC
Super User
Super User

@NKotak_Leecare 

 

You can use the following measure to achieve what you're after:

 

MEASURE = IF ( ISFILTERED ( Table[Column] ) , SELECTEDVALUE ( Table[Column] ) , "NA" )

Output of unselected is:

TheoC_0-1644882563412.png

Example of a selected value is:

TheoC_1-1644882583706.png

Hope this helps 🙂

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thank you Theo!

 

I have tried using this measure but I am getting the Form ID rather than the count of it.

 

MEASURE = IF ( ISFILTERED ( 'ltcdb_test ltcschema'[ReportCaption] ) , SELECTEDVALUE ( 'ltcdb_test ltcschema'[FormID] ) , "NA" )
 
Output: Forms Count Issue Measure.png
 
The count of form via card visual is 1 whereas using Measure it is showing 1401. 1401 is actually the ID of that form and not the count. Can you please let me know how can I display the count with this meassure?

Hi Theo,

 

It worked out. I just changed the selectedvalue to count and i got both the things i wanted.

 

MEASURE = IF ( ISFILTERED ( 'ltcdb_test ltcschema'[ReportCaption] ) , COUNT( 'ltcdb_test ltcschema'[FormID] ) , "NA" )

 

Thank you heaps for your time and support.

 

Cheers!

@NKotak_Leecare sincere apologies!  I only saw your comment after you send the most recent one!  Apologies but well done on getting a solution!

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

All good, Theo! Thank you for helping me out with the main formula :))

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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