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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors