Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have write a YTD measure and it works fine if my columns are Year, Month. However, it doesn't work if I want to use the column yyyymm. Please help me fix it.
Thank you so much
Solved! Go to Solution.
For the yyyymm format (Yr_M), you can use a modified approach by transforming the Yr_M values into proper date formats:
SO Amt YTD_FF =
CALCULATE(
SUM('Table'[SO Amt]),
FILTER(
ALL('Table'),
'Table'[Yr_M] <= MAX('Table'[Yr_M]) &&
YEAR(DATE(LEFT('Table'[Yr_M], 4), MID('Table'[Yr_M], 5, 2), 1)) = YEAR(TODAY())
)
)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi,
If the YYMMM column is from the Calendar Table, then try this
Measure = calculate([Sales],datesytd(calendar[date],"31/12")))
Hope this helps.
For the yyyymm format (Yr_M), you can use a modified approach by transforming the Yr_M values into proper date formats:
SO Amt YTD_FF =
CALCULATE(
SUM('Table'[SO Amt]),
FILTER(
ALL('Table'),
'Table'[Yr_M] <= MAX('Table'[Yr_M]) &&
YEAR(DATE(LEFT('Table'[Yr_M], 4), MID('Table'[Yr_M], 5, 2), 1)) = YEAR(TODAY())
)
)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Thank you so much! It works perfectly now.
I would like to ask if I don't want Year (Today), how can I change it?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |