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 have a snapshot table with student population with rows for students attending per the first of each month.
My report should show the daily totals except for the population. This needs to be the population of the first of october this studyyear (runs from 1 september till 31 august in the date dimension). I got that to work with: Populatie per 1 oktober:=CALCULATE(sum('Inschrijvingen stand'[Aantal]), Datum[Maandnummer] = 10, Datum[Dagnummer van maand] = 1, ALLEXCEPT(datum, Datum[Studiejaar])) this works because even if the page has a filter: today= true, I get to keep the studyyear from todays date 🙂
But the target should be the population of the studyyear before. For some reason my sameperiod last year isn't working:
Norm populatie per 1 oktober:= CALCULATE([Populatie per 1 oktober], SAMEPERIODLASTYEAR(Datum[Datum]), all(datum)) shows all the first of octobers. same if i do the same allexcept on studiejaar as in the previous measure. How do I get this to work?
The year is mandatory for SAMEPERIODLASTYEAR function. Please do have a look at the below link for more details,
https://msdn.microsoft.com/en-us/query-bi/dax/sameperiodlastyear-function-dax
Thanks for your reply, but I don't quite understand.
In what way is it mandatory?
=CALCULATE(SUM(ResellerSales_USD[SalesAmount_USD]), SAMEPERIODLASTYEAR(DateTime[DateKey]))
is similar to my usage isn't it?
no one?
Could you please post sample data along with the expected result?
that's going to be difficult as it is a SSAS cube...
User | Count |
---|---|
85 | |
76 | |
72 | |
69 | |
56 |
User | Count |
---|---|
104 | |
99 | |
92 | |
78 | |
69 |