cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnray
Frequent Visitor

Why am I getting Empty and 0 values in table ?

Hi,

 

I am wondering why am I getting both 0 and empty values at the same time ?

 

johnray_1-1623973809128.png

 

How can i fix my measures such that the table will display "0" consistently?

 

Volume this week =

var _max = TODAY()
var _min = _max - 7
var _volweek = CALCULATE(SUM(Message[Number Of Messages]),FILTER('Date','Date'[Date] <= _max && 'Date'[Date] >= _min))
Return
_volweek
 
Volume 1 week ago =
var _max = TODAY()
var _min = _max - 14
var _vol = CALCULATE(SUM(Message[Number Of Messages]),FILTER('Date','Date'[Date] <= _max && 'Date'[Date] >= _min))
var _volweek = _vol - CALCULATE(SUM(Message[Number Of Messages]),FILTER('Date','Date'[Date] <= _max && 'Date'[Date] >= _max - 7))

Return
_volweek
1 ACCEPTED SOLUTION
johnray
Frequent Visitor

I have been able to fix the problem:

I updated the return statement into:

Return
if(_volweek = BLANK(), 0,
if(_volweek > 0, _volweek)

View solution in original post

3 REPLIES 3
johnray
Frequent Visitor

I have been able to fix the problem:

I updated the return statement into:

Return
if(_volweek = BLANK(), 0,
if(_volweek > 0, _volweek)

View solution in original post

Ashish_Mathur
Super User III
Super User III

Hi,

In the Number of messages column of the Messages table, there are entries which are 0's and also blanks.  It's just a guess.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur I checked the data set and the Number of Messages in the Messages Table. The values are neither blank nor 0. The number of messages column is only populated when messages are sent during a specific date.

 

johnray_0-1624014525785.png

 

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors