Forum Discussion
powerbiexpert22
2 years agoImpactful Individual
filtering date table
i am using three tables customer , survey and date (calendar) i am trying to calculate rolling promoters for last 4 months i am using country as slicer i want to show rolling 4 month based on last...
- 2 years ago
Hi,
Modify your measure to
Rolling4monthPromoters = CALCULATE([Promoters],DATESINPERIOD('Date'[Date],[maxresponsedate],-4,MONTH))Hope this helps.
Daniel29195
2 years agoCommunity Champion
try the following measure ;
Rolling4monthPromoters =
var d = calculate(max('Date'[Date]),survey)
return
CALCULATE([Promoters],
DATESINPERIOD('Date'[Date],d,-4,MONTH))
the idea is, that you want to max date for germany,.
the idea is, that you want to max date for germany,.
howver customer doesnt filter date .
so when you are filtering country = germany.
and then in your code you are selecting max(date[date]) , you are returning the max date of dimdate independent of the filter on the country.
let me know if this helps.