Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All,
Need some help with Sales YTD and Sales for Last Year YTD.
I have two measures as per below to calculate Sales YTD and Last Year'S Sales YTD
I have a Calendar table and my financial year starts in July. both tables are connected via date.
Calendar = CALENDARAUTO(6)
The data source table has Date, Location, and Sales Column.
Appreciate your help on this.
Regards
RI
Hi
I tried to revise something
YTD Sales = CALCULATE(sum(Sales[Sales]),DATESYTD('Calendar'[Date],"06/30"))
About your LY YTD, as I know ,function DATEADD will return to a whole last month, mean dateadd('Calendar'[Date],-1, YEAR),"6/30") will be 1/7/2021-31/7/2021
to your expect, i tried revise:
LY YTD = CALCULATE(SUM(Sales[Sales]),DATESYTD('Calendar'[Date],"6/30"), 'Calendar'[Date] <= DATEADD (ENDOFYEAR ('Calendar'[Date],"6/30"),-1,YEAR))
Try Using
Ytd = totalytd(sum(sales), datetable)
last year ytd = calculate(ytd, dateadd(datetable ,-1 , year)
hi @Tsrivastava , unfortunately, it doesn't work. the table returns blank.
@Rubal_Islam , The measure is correct, but there is no date in context. datesytd take the last date of the calendar, for which you might not have data.
Other than that, make sure, the calendar table is marked as date table.
There 6 such rules refer
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
84 | |
65 | |
62 | |
55 |
User | Count |
---|---|
179 | |
108 | |
104 | |
71 | |
70 |