Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet 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
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)
)
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!
Solved! Go to Solution.
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
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
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
I get the perpetual spinning circle when I add +0.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
86 | |
84 | |
66 | |
49 |
User | Count |
---|---|
140 | |
113 | |
106 | |
64 | |
60 |