Forum Discussion
HB13
Helper I
4 years agoHow to create a dynamic DAX measure value that changes according to the filter applied on the visual
Hi all! I have this DAX measure in Power BI; CALCULATE ( SUM(Table1[amount]) , YEAR(Table2[date]) = 2021 ) This measure is used in a visual that is being filtered by a _DateTable[date], that ...
Adescrit
Impactful Individual
4 years agoHi HB13
You could try:
Measure =
VAR __SelectedYear = SELECTEDVALUE(DateTable[Year])
RETURN
CALCULATE ( SUM(Table1[amount]) , YEAR(Table2[date]) = __SelectedYear )
I'm assuming there is a column [Year] in the DateTable for this to work.
HB13
Helper I
4 years agoThis worked beautifully! Thank you so so much!!