Forum Discussion
Gabriel_Pedri
2 years agoResolver I
Filtering through Power BI Measures
I have a date calculated through a measure. I want to use this date to return the value of another measure: CALCULATED DATE Date Variation = MAX('Calendar'[Date]) - [PMP] TOTAL STOCK ...
- 2 years ago
I managed to achieve the final result through this:
Total Stock PMP =
VAR month = MONTH([Date Variation])
VAR year = YEAR([Date Variation])RETURN
CALCULATE(
[Total Stock],
FILTER (
ALL('Calendar'),
'Calendar'[MonthN] = month &&
'Calendar'[Year] = year
)
)Thank you for your attention.
Best regards!
Anonymous
2 years agoNot applicable
Personally I usually add something like this to my date table
in your case it would be month instead of weeks
Gabriel_Pedri
2 years agoResolver I
I managed to achieve the final result through this:
Total Stock PMP =
VAR month = MONTH([Date Variation])
VAR year = YEAR([Date Variation])
RETURN
CALCULATE(
[Total Stock],
FILTER (
ALL('Calendar'),
'Calendar'[MonthN] = month &&
'Calendar'[Year] = year
)
)
Thank you for your attention.
Best regards!