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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Shakeerm
Helper II
Helper II

How to show NULL on Card Visual when Filtered by a Slicer

Hey Mates, 

Let me start by emphasizing the requirement,

I want to show NULL on my Card Visual when it is filtered by the "Task Status" Slicer. 

 

In my Table i have Job Numbers and each Job Number has Multiple Tasks. I have set up a Card Visual for each Status to count the number of Jobs  when a Task is Opened, Assigned, Working or Closed.

 

When the Task Status Slicer is clicked to an individual Status, the rest of the Status Card shows "(Blank)". I want to show either "Null"or just three dots "..." to make it more visible friendly. 

 Any suggestion would be appreciated. 

 

Cards.pngTable.png

 

3 ACCEPTED SOLUTIONS

@Shakeerm ,

you can find an example here:

https://1drv.ms/u/s!AuEtYsiOJTxVhY0TZYAmV3a14opkSQ?e=fqLYaF

 

I've just implemented @parry2k solution and it works as expectded.

Hope it helps.

Cheers,

Marco

View solution in original post

@Shakeerm Wow, glad to hear it worked, I was not sure if you are adding this as a column. Read this post to understand the difference between Measures and Columns. It is very fundamental to work with Power BI and you get to know this.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

Hi @Shakeerm ,

I think that the reason why you are getting that error is because Power BI does not know which type of calculated column to create:

-  "...." -> Text data type

- COUNTROWS -> Number data type

 

The error can be avoided by replacing ClosedTasks with CONVERT(ClosedTasks, STRING)

Hope it helps.

Cheers,

Marco

View solution in original post

8 REPLIES 8
parry2k
Super User
Super User

@Shakeerm whatever measure you created for individiual status you need to check blank and force it to show text, for example

 

Closed Measure = 
VAR __measure = <your existing measure calculation>
RETURN
IF ( __measure == BLANK(), "Null", FORMAT ( __measure, "General Number" )

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k 

Thanks for reaching out.

However my issue is i don't have any Blanks in my Status Column. What i'm trying to achive is that when the Status is Filterd i.e. select "ASN" on the Dashboard, the Card visuals of other statuses need to show as NULL instead of "(Blank)". 

 

pardon me in advance if i'm not making sense. 

 

Appreciate the help mate

 

 

@Shakeerm did you tried the solution I posted, of course there are no blanks, it is the measure that returns blank() if no record found based on selection and we are going to force it to show NULL.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Yes Sir i did... But it did not work. Let me know if i did something wrong here

 

Measure Calculation.png

@Shakeerm ,

you can find an example here:

https://1drv.ms/u/s!AuEtYsiOJTxVhY0TZYAmV3a14opkSQ?e=fqLYaF

 

I've just implemented @parry2k solution and it works as expectded.

Hope it helps.

Cheers,

Marco

Hi @MarcoPessina 

Splendid Mate...!!! that worked.. 

 

However a quick question though, instead of usiung a New Measure i first entered this formula in a new Column & it gave me this error. What's the difference here in entering the same in a New Measure vs a New Column. 

 

ClosedTask Issue.png

 

 

Hi @Shakeerm ,

I think that the reason why you are getting that error is because Power BI does not know which type of calculated column to create:

-  "...." -> Text data type

- COUNTROWS -> Number data type

 

The error can be avoided by replacing ClosedTasks with CONVERT(ClosedTasks, STRING)

Hope it helps.

Cheers,

Marco

@Shakeerm Wow, glad to hear it worked, I was not sure if you are adding this as a column. Read this post to understand the difference between Measures and Columns. It is very fundamental to work with Power BI and you get to know this.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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