Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
how can I grieve only the date on yellow by YTD-1
Thank you.
Hi:
I don't see your table name, what you want to calculate, etc,, But you can try to do the following to obtain a YTD result.
Develope Calc Cols in Table YEAR = YEAR[Response date])
Month No. = MONTH([Response Date])
Month = FORMAT([Response date], "MMM")
YTD X =
var curryear = MAX(Table[Year])
var currdate = MAX(Table[Response date])
return
Calculate(
[X],
Table[Response date] <= currdate,
Table[Year] = currYear,
ALL(Table[Month}),
ALL(Table[Month No]))
YTD LY = CALCULATE([YTD X], SAMEPERIODLASTYEAR(Dates[Date])) * Need qualified date table. If you have this than YTD can simply be:
YTD X = CALCULATE({X],
DATESYTD(Dates'Date]) or change first year variable above to var Lyear = MAX(Table[Year])-1
I hope this helps.
I want just display "YTD N-1" in the column has the place of the date which is in yellow (2021)
Hi @Nihed ,
Please try:
Col = IF(Year('Table'[Response Date]) = 2021,"YTD N-1",'Table'[Response Date])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi:
Can you try this.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
22 | |
21 | |
20 | |
14 | |
11 |
User | Count |
---|---|
41 | |
31 | |
25 | |
23 | |
23 |