The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Good afternoon.
I have a requirement that shows a measure, and the same period last year in the same table. This is easy enough with the following:
CALCULATE([MEASURE], SAMEPERIODLASTYEAR('D Date'[Date]) )
And that gives me a nice table:
I want the table to be filtered for the last day in a month though (so we see performance on the 30th June, 31st May, etc...) like this:
When I filter the table for a month-end-flag in the date table I get the error about continuous dates (understandable). It is a pretty simple relationship in the model:
So, my question:
Can I filter sameperiodlastyear in this context with a different approach?
If not, I can use something like
'D Date'[Date]=EDATE(SELECTEDVALUE('D Date'[Date]),-12)
But does this have any limitations that I don't know about (end of Februarys, for example)?
What is best practice here?
Any help appreciated.
@mthomas1973 , The flag is in the date table? and relation with fact is single directional?
Hi @lamth , thank you for your reply.
Yes, the flag is a simple 1 or 0 in the date table and it is has a single directional relationship with the fact table.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
101 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
264 | |
120 | |
115 | |
83 | |
70 |