Forum Discussion
Anonymous
5 years agoNot applicable
Find first year value
Hi All, I would like to find the value in the earliest Year. For example, if I filter to [Year ] = 2020, I should see the following. My Year slicer is single selection. BA1 = 21 BA2 = 32 BA3 ...
amitchandak
5 years agoSuper User
Anonymous , Try a measure like for value
Measure =
VAR __id = MAX ('Table'[Code] )
VAR __date = CALCULATE ( Min('Table'[Year] ), ALLSELECTED ('Table' ), 'Table'[Code] = __id )
CALCULATE ( Sum ('Table'[Value] ), VALUES ('Table'[Code] ),'Table'[Code] = __id,'Table'[Year] = __date )
if needed take min for year in visual
- Anonymous5 years agoNot applicable
Hi amitchandak , thanks for your help. The dax works well in a table visual but it doesn't show the correct earliest value when it is used in a Card visual
Regards,
BK