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.

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.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors