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,
I'm trying to create a measure that returns my sales from the parallel period LY to this exact date.
i.e : if today is the 09/05/24 I would like to retrieve sales from 01/01/23 to 09/05/23.
And compare that with the parallel period this year.
These are the measures I use:
Solved! Go to Solution.
Hi,
Thanks for your reply.
The LY YTD is solved....
For some reason the YTD stops on April and doesn't show the May sales.
This is the code I wrote:
@Sivadster share your sample dataset, and try to create correct connection between Calendar Table and your data table, i.e make sure column type should be DATE for both related columns
@Sivadster You can achieve this by using the following measure, you need to create a Calendar Table:
Date Table = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
Sales LYTD =
TOTALYTD(SUM('Table'[Sales]),
DATEADD('Date Table'[Date],-1,YEAR))
Sales YTD =
TOTALYTD(SUM('Table'[Sales]), 'Date Table'[Date])
Power BI File:
Regards,
Fahad Qadir
Did I answer your question? Mark my post as a solution!
Hi,
Thanks for your reply.
The LY YTD is solved....
For some reason the YTD stops on April and doesn't show the May sales.
This is the code I wrote:
@Sivadster share your sample dataset, and try to create correct connection between Calendar Table and your data table, i.e make sure column type should be DATE for both related columns
Hi, found a problem that caused it. Your solution works.
Thanks
User | Count |
---|---|
80 | |
74 | |
62 | |
61 | |
46 |
User | Count |
---|---|
108 | |
97 | |
88 | |
81 | |
61 |