Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am hoping for some assistance in creating a YTD same store growth calculation. The goal is to see how stores are growing that were open in both the prior and current year.
The dax calculation I have right now is below. This works great for individual periods (we measure in weeks on a 4-4-5 calendar) as it looks to see if there is revenue in the current and prior year period and if so includes it in the calculation to determine growth.
Hi @nickvb ,
here because there is no data given i'm using 'table' and some column names. Please replace them with the actuals ones.
Please use the below formula :
SAME PERIOD LAST YEAR = VAR DataMaxDate = CALCULATE ( MAX ( 'Table'[Date.Date].[Date] ), ALL ('Table' ) ) RETURN CALCULATE ( [YTD Sales], SAMEPERIODLASTYEAR ( INTERSECT ( VALUES ('Table'[Date.Date].[Date] ), DATESBETWEEN ( 'Table'[Date.Date], BLANK (), DataMaxDate ) ) ) )
NOTE : make sure to change Date column to date type otherwise you will end up with the same issue you are facing.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Regards,
Gaurav Raj Singh
LinkedIN : https://www.linkedin.com/in/gauravrajsingh/
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
18 | |
17 | |
16 |
User | Count |
---|---|
27 | |
26 | |
19 | |
15 | |
14 |