Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
Does anyone know how can I do that using a measure? Thanks.
Regards,
BK
Hi @Anonymous ,
What kind of card visual you are looking for? Each code has a card visual or put them in one card visual?
Best Regards,
Jay
Try:
min year value =
VAR MinYear = MINX(ALLEXCEPT(Table, Table[Code]), Table [Year])
RETURN
CALCULATE(SUM(Table[Value]), FILTER(ALL(Table), Table[Year] = MinYear))
Proud to be a Super User!
Paul on Linkedin.
@Anonymous, Try the below code in measure
CALCULATE(SUM(Table[Value]), Table[Year] < 2020)
@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
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |