Forum Discussion
YTD in Matrix Table
- 5 years ago
Hi Anonymous ,
Please refer to this:
https://community.powerbi.com/t5/Desktop/SAMEPERIODLASTYEAR-with-a-year-filter/td-p/91501
If the problem persists,could you share the sample pbix with dummy data?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , what to mean by ytd here, each year only till April ?
For that create a date table, join date of date with order date. Add year to date table and use that year in visual
Create measure like
YTD Corrected =
var _max = format(today(),"MMDD")
return
calculate(Sum('Table'[AmountNoavt]),DATESYTD('Date'[Date]),format('Date'[Date],"MMDD")<=_max)
or
YTD Corrected =
var _max = format(today(),"MMDD")
return
if(format(max('Date'[Date]),"MMDD")<=_max, calculate(Sum('Table'[AmountNoavt]),DATESYTD('Date'[Date])),blank())
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.