Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not 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 = 13

Does anyone know how can I do that using a measure? Thanks.

beekee_1-1621928196487.png

 

Regards,

BK

5 REPLIES 5
Anonymous
Not applicable

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

PaulDBrown
Community Champion
Community Champion

Try:

min year value =
VAR MinYear = MINX(ALLEXCEPT(Table, Table[Code]), Table [Year])

RETURN

CALCULATE(SUM(Table[Value]), FILTER(ALL(Table), Table[Year] = MinYear))





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous, Try the below code in measure

 

CALCULATE(SUM(Table[Value]), Table[Year] < 2020) 

amitchandak
Super User
Super 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not 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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.