The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hey there!
I'm in need of a dynamic same period last year comparison between 2022 and 2021. Currently my SAMEPERIODLASTYEAR formula returns the below results giving me a full last year comparison against the current year.
SUM LY Sameperiod = CALCULATE(sum('My Dataset'[Amount]), SAMEPERIODLASTYEAR('Date Table'[Date]))
I would like a formula that returns last year data for the same period as I have current year data ie. Jan 1 - Nov 23 for both 2022 and 2021. The report will update every day adding another day and it should be reflected in the report. I do not want to use manual filters like slicers.
Thank you very much!
The SAMEPERIODLASTYEAR function uses full period for comparison. Take a look at the solution provided in this article - https://radacad.com/same-period-last-year-to-date-dax-calculation-in-power-bi
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
182 | |
81 | |
64 | |
46 | |
41 |