Forum Discussion
ValentinBIA
8 years agoResolver I
Variance over week (DAX)
Good morning Power BI community ! I'm sure my problem has an easy solution, but I haven't had the time to read "Learn to write DAX", I'm still focused on "M is for (data) monkeys" (almost done th...
- Anonymous8 years ago
This should work:
Total Rentals Previous Week = VAR selectedWeek = SELECTEDVALUE('Journeys by station'[Week]) RETURN CALCULATE( [Total Rentals], 'Journeys by station'[Week] = selectedWeek - 1 )You may need some adjustment if you have values for the same week in different years.
Anonymous
8 years agoNot applicable
This should work:
Total Rentals Previous Week =
VAR selectedWeek = SELECTEDVALUE('Journeys by station'[Week])
RETURN
CALCULATE(
[Total Rentals],
'Journeys by station'[Week] = selectedWeek - 1
)You may need some adjustment if you have values for the same week in different years.
- ValentinBIA8 years agoResolver I
Hey Anonymous, thank you very much, that is exactly what I was looking for !