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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors