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, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Huguo90
Helper I
Helper I

display zero in the visual card instead of blank

I created a measure who calculate a number, but when he don't find the number. But I have BLANK, I'll like to have 0 instead of BLANK. 

 

here is the measure : 

Statuts_1 = CALCULATE(COUNTROWS(Contact),FILTER(Contact,Contact[Status__c] = "activated"), FILTER(Contact,Contact[DeveloperName] = "Employee"))
 
 
Thanksverif test.PNG
1 ACCEPTED SOLUTION
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Huguo90 

 

Plese try both options:

 

Statuts_1 = 
CALCULATE(COUNTROWS(Contact),FILTER(Contact,Contact[Status__c] = "activated"), FILTER(Contact,Contact[DeveloperName] = "Employee"))

+ 0

 

or 

 

Statuts_1 = 
var var_Calculation =
CALCULATE(COUNTROWS(Contact),FILTER(Contact,Contact[Status__c] = "activated"), FILTER(Contact,Contact[DeveloperName] = "Employee"))

RETURN
IF(ISBLANK(var_Calculation),0,var_Calculation)

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

3 REPLIES 3
Huguo90
Helper I
Helper I

@Mikelytics  It's works. Thanks

Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Huguo90 

 

Plese try both options:

 

Statuts_1 = 
CALCULATE(COUNTROWS(Contact),FILTER(Contact,Contact[Status__c] = "activated"), FILTER(Contact,Contact[DeveloperName] = "Employee"))

+ 0

 

or 

 

Statuts_1 = 
var var_Calculation =
CALCULATE(COUNTROWS(Contact),FILTER(Contact,Contact[Status__c] = "activated"), FILTER(Contact,Contact[DeveloperName] = "Employee"))

RETURN
IF(ISBLANK(var_Calculation),0,var_Calculation)

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Hello @Mikelytics , 

 

I style have the same problem on  statuts_1, can you Help me to resolve that. Thanks, 

 

Huguo90_0-1669624177256.png

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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