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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PBrainNWH
Helper II
Helper II

0 instead of blank

How can I show 0 instead of blank as a result of this measure?

CALCULATE (
SUM('Opportunity Contact Role'[Amount__c]),
'Opportunity Contact Role'[Close_Date__c] >= DATE(2022, 7, 1) &&
'Opportunity Contact Role'[Close_Date__c] <= DATE(2023, 6, 30)
)

PBrainNWH_0-1721660314064.png

 

 

I've tried several ways to add 0 to the measure, but each time when I add the measure to my table I just get a spinning circle and eventually craps out. Works fine, as seen above with the 0, but I need the 0!

Thanks!

1 ACCEPTED SOLUTION
PBrainNWH
Helper II
Helper II

Ended up creating custom column based on date range. 

 

if [Close_Date__c] >= #date(2022, 7, 1) and [Close_Date__c] <= #date(2023, 6, 30) then [Amount__c] else 0

View solution in original post

3 REPLIES 3
PBrainNWH
Helper II
Helper II

Ended up creating custom column based on date range. 

 

if [Close_Date__c] >= #date(2022, 7, 1) and [Close_Date__c] <= #date(2023, 6, 30) then [Amount__c] else 0

TomMartens
Super User
Super User

Hey @PBrainNWH ,

 

this article explains why returning 0 instead of BLANK is not a good idea: Chris Webb's BI Blog (crossjoin.co.uk)

The aricle also shows a simple example how make a measure return 0 instead of BLANK.

I would give this a try:

CALCULATE (
SUM('Opportunity Contact Role'[Amount__c]),
'Opportunity Contact Role'[Close_Date__c] >= DATE(2022, 7, 1) &&
'Opportunity Contact Role'[Close_Date__c] <= DATE(2023, 6, 30)
)+0

Hopefully this provides what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

I get the perpetual spinning circle when I add +0.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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