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
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
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.