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
PhineasT
Helper I
Helper I

Replace Blank Values and Empty Visuals

I want to display a '0' in the top box (circle that reads "Blank"), if the is no associated data to calculate and the phrase 'No data available' in the low box (circle).

Is this possible?

 

PhineasT_0-1664808145324.png

 

2 ACCEPTED SOLUTIONS

Hi @PhineasT 

please try this measure 

Count =
DISTINCTCOUNT ( ByProjectActivityTbl[ProjectActivity] ) + 0

 

you try with COUNTA instead of DISTINCTCOUNT depending on your requirement 

View solution in original post

12 REPLIES 12
tamerj1
Super User
Super User

Hi @PhineasT 

Assuming activities completed is a measure of decimal or integer data type then try

Assuming activities =
"Original aggregation formula" + 0

It is not a measure of decimal, it is a text field on which I need to apply a Count condition that returns the total number of 'Activities'.

PhineasT_0-1664809632369.png

 

 I believe the calculationis being impacted by the Project Name dropdown on the right edge. The Activities count changes whent he dropdown changes, and where there is no 'Activity' (Blank) appears.

I think I may need two control, for I need one static control that shows ALL 'Activities' and I need to know how many 'Activities' based on the choice in the dropdown.

Hi @PhineasT 

please try this measure 

Count =
DISTINCTCOUNT ( ByProjectActivityTbl[ProjectActivity] ) + 0

 

you try with COUNTA instead of DISTINCTCOUNT depending on your requirement 

Is there anything I can do about default text in blank box under each count?

I count is zero I'd like box to default 'No Items Available'.

@PhineasT 
Please try

Count =
COALESCE ( DISTINCTCOUNT ( ByProjectActivityTbl[ProjectActivity] ), "No Items Available" )

Power BI didn't like it -

PhineasT_0-1664815402860.png

 

@PhineasT 

Delete this part

4A6A047D-E463-4E9B-91F5-8A96256DA04A.jpeg

I intrepreted your instruction to mean delete the 'Count'?

If that is the case Power BI still doesn't like it.

PhineasT_0-1664815843345.png

 

@PhineasT 

Hit "Enter"

I believe this would be still considered part of the original question...

Is it possible to create a Card with a total count that is not impacted by the action of the dropdown, as is the case with all the others?

@PhineasT 

Yes. Please try

CALCULATE ( DISTINCTCOUNT ( ByProjectActivityTbl[ProjectActivity] ), REMOVEFILTERS ( ) )

I did a few more tests on the 'No items...' change.

Now a number appears when there is content to display rather than the text that was there. Please advise.

The new measure causing this was

PhineasT_2-1664817582990.png


Required output is available content, if no available content then 'No items...' message.
PhineasT_0-1664817204320.png

 

This is how it use to look.

PhineasT_1-1664817387394.png

 

 

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.

Top Solution Authors