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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Get the First value and Last value Only

I have a table with a production line information
like
Model
Start Date
End Date
and others

I want to show in a Column Visual only the first data when the model was registered and the last date that was registered
Similar to this 

EC3_0-1611354609096.png

Each color represents a Car Model 
I dont need to display the middle values , just the first and last one

It is possible?

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

h1.png

 

You may create a measure as below.

Visual Control = 
var mindate = 
CALCULATE(
    MIN('Table'[Date]),
    FILTER(
        ALLEXCEPT('Table','Table'[Model]),
        [IsReistered]="Yes"
    )
)
var maxdate = 
CALCULATE(
    MAX('Table'[Date]),
    FILTER(
        ALLEXCEPT('Table','Table'[Model]),
        [IsReistered]="Yes"
    )
)
return
IF(
    MAX('Table'[IsReistered])="Yes"&&(MAX('Table'[Date])=mindate||MAX('Table'[Date])=maxdate),
    1,0
)

 

Then you need to put the measure in the visual level filter to filter the result.

h2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

It works, but I only get the last date 

In your visual yo have the first date when the model A entered and the last dat whne the model change occurrs 

and I only get the latest date of each model

what could be possible wrong?

 

Hi, @Anonymous 

 

Could you please show us some sample data and expected results with OneDrive for business? Do mask sensitive data before uploading. Thanks.

 

Best Regards

Allan

lbendlin
Super User
Super User

Have you looked at MIN/MAX, FIRSTDATE/LASTDATE, FIRSTNONBLANK/LASTNONBLANK ?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors