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.
Hello All,
First Post Here.
My question pertains to calculating YTD sales for the current and the previous year.
I've seen other posts regarding the following formula: Total Sales LY = CALCULATE(SUM('Sales'[Today sales]), SAMEPERIODLASTYEAR('Date'[Date]))
However, it seems this assumes that the Prior Year data and current year data are in the same table.
Is it possible to this calculation with 2 seperate tables one for CY and one for PY so that when i filter on the first 2 quarters it shows Q1 & Q2 of '17 and '18?
Alex
Hi @dahdouhap
Yes, its possible . Assumeing that , your current year data in Table1, and last year data in Table2, then you can uset he below formula for LY.
Total Sales LY = CALCULATE(SUM(Table2[sales]), SAMEPERIODLASTYEAR('Date'[Date]))
Primiarily the filter is applied on your data table and then it flows to the table. Filter on Date differentaites the CY, LY values, not on the fact table.
Thanks
Raj
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
104 | |
93 | |
83 | |
64 |