Forum Discussion
Hide partial YTD Column
- 8 years ago
Hi,
Try this formula
IncrementTr YTD = if(VALUES('Date'[Date])<=TODAY(),CALCULATE([IncrementTr Total],DATESYTD('Date'[Date],"30/6")),BLANK())
- 8 years ago
Here the link:
https://drive.google.com/drive/folders/1P10op_192ac_m-QGqt-QjolaLZSIMc_t?usp=sharing (Filename: TrackingExample)
There is a date dimension table and two other tables. One (RegistrationTarget) contains target values for the rest of the year. Second (RegistrationTracking) contains the historical data which I would only like to see until today and 'blank out' the remainder of the year to come.
Thanks!
Glad you found the solution.
Another approach is to use cummulative total pattern:
IncrementTr YTD =
CALCULATE( sum(RegistrationTracking[Increment]), filter(All('Date'), 'Date'[Date] <= Max(RegistrationTracking[SnapshotDate])))
The advantage is you don't have to hard code the end date.
Check this article :
Calculating Cumulative Or Running Totals In Power BI using DAX
- DieLem8 years agoHelper II
Hey anandav this also works, thanks!
I hear what you say about not hard coding, that's wise.
Both solutions work. However when I add a field to the column series to split graph into different revenue streams (PackageCode) it suddenly jumps the whole screen.
Is there a reason for this?