Forum Discussion
Soof1234
Helper I
2 years agoCompare dates based on date selection.
Hi, To start with, I couldnt find a proper title for my case. The issue: I have a dateslicer which I want to use to filter several measure that calculate turnover, hours made, occupancy et...
Soof1234
Helper I
2 years agoHappy to find the solution myself, was as simple as it could be afterwards:)
Just added a count of the selected months was sufficient.
_Totaal_Uren_verschil =
Var Aantal_Maanden = COUNT(Datum[Maand])
VAR Uren = [_Totaal_uren]
VAR Uren_vorige_maand = CALCULATE([_Totaal_uren], DATEADD('Datum'[Date],0-Aantal_Maanden,MONTH))
VAR verschil = (Uren - Uren_vorige_maand) / Uren_vorige_maand
Return verschil