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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Anonymous
Not applicable

I have been able to fix the problem:

I updated the return statement into:

Return
if(_volweek = BLANK(), 0,
if(_volweek > 0, _volweek)
Ashish_Mathur
Super User
Super User

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/
Anonymous
Not applicable

@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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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