Forum Discussion
Anonymous
9 years agoNot applicable
Visualization: YTD target vs YTD actual
I've got a table with dates and sales, it's connected to CRM online which will be auto refreshed. i've created a "Gauge" dashboard with Max (Year Target) and Target (YTD Target) t...
GilbertQ
Super User
9 years agoHi Anonymous, you could use the TOTALYTD and then as the code below is shown, it will complete the YTD until the 30 June, if you want it until December you can either change it to be "12/31" or remove it.
TOTALYTD([Sales],'Date'[Calendar Date],ALL('Date'[Calendar Date]),"6/30")NOTE: For the above you do require a Date table. In which you can implement this into your model with this blog post: Power BI – How to Easily Create Dynamic Date Table/Dimension with Fiscal Attributes using Power Query
And then you can get Todays Target based on a Calculated Measure.
Anonymous
9 years agoNot applicable
GilbertQ thanks, is there any way to replace 30/06 to "today", so i don't need to update this everyday?
- GilbertQ9 years ago
Super User
Hi Anonymous, you could possibly create another Calculated Measure which will can then use a filter.
EG:Todays Total = CALCULATE([My measure],Filter('Dates','Dates'[Calendar Date] = NOW()))