PowerPivot Measure Formula that will return Blank

fr650008

New Member
Joined
Jun 21, 2014
Messages
9
Hello,

I am wondering if someone can help me. I've been looking at other forums online but I cannot find a similar problem. I am creating a burndown chart in PowerPivot with data linked to SQL server. The actual burndown data is in a table that links date of completion to a calendar and uses the following measures formula to calculate the burndown line: =(CALCULATE([Total WO Count], All(DateTable[Date])))-([Actual WO Complete](DATESBETWEEN(DateTable[Date], BLANK(),LASTDATE( DateTable[Date])), All(DateTable)))


However, once the date is greater than today I get a line in my chart that is a straight line reaching to the end of the calendar. I need to return blank for when the min value for actual WO complete is reached. Can anyone help? I've tried using If and Min in separate measures that reference the above measure but that is not working for me and I'm not sure why.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Thanks for your help, TJ. I tried the formula and I'm getting this error:

Calculation error in measure 'WorkOrderViewBurndownTable'[Measure 1]: The value for column 'Date' in table 'DateTable' cannot be determined in the current context. Check that all columns referenced in the calculation expression exist, and that there are no circular dependencies. This can also occur when the formula for a measure refers directly to a column without performing any aggregation--such as sum, average, or count--on that column. The column does not have a single value; it has many values, one for each row of the table, and no row has been specified.
 
Upvote 0
It's so hard to figure out what's going wrong without looking at your workbook.
Looks like there is something wrong with your formula. The last all(datetable) is basically overwriting your datesbetween, try remove it.
 
Upvote 0
Hi fr,

...This can also occur when the formula for a measure refers directly to a column without performing any aggregation--such as sum, average, or count--on that column...

So, in attempting to answer one of my first powerpivot questions, I broke one of the golden rules of measures/calcfields by not aggregating... brutal. :oops:

how about:

Code:
=if(max([Date])>=today(),blank(),[[I]yourmeasure[/I]])

I tried this with the following example data and got it to sum everything with a date < today().

Sum_If_Less_Than_Today.png


Thinking if it works for sum it should work for your measure. I was also looking at the datesbetween() function that XLBob mentioned. Maybe feeding the function Today()-1 as the End_date parameter?

Code:
Measure 3:=calculate([vmSUM],(DATESBETWEEN(Table1[Date], BLANK(),today()-1)))
 
Last edited:
Upvote 0
The if statement worked! Thanks so much TJ for your help! And thanks for your help too Bob!

For anyone's future reference I tried changing the measure and it gave a straight line for the value of today... Haven't figured out why - it doesn't seem to make sense to me.
 
Upvote 0

Forum statistics

Threads
1,224,002
Messages
6,175,899
Members
452,681
Latest member
jlcm0924

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top