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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kalspiros
Helper I
Helper I

Earliest values based on timeline

Hi All,

 

i think that can be solved with a CALCULATETABLE that will filter the sliced data and then return the EARLIEST but not too savvy with such sets, plus, from my research on this forum, i didn't manage to make EARLIEST work.

 

I would be looking for a measure that will be always returning the earliest [fx Average Value] of (Data[Point]) based on the (Data[Date]) that will be dynamically slicing the data.

Something like the images below (red boxes indicate the needed values)

kalspiros_1-1610752057538.png

kalspiros_3-1610752340109.png

 

Many thanks in advance!

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

@kalspiros 

I'd misread. Then use that earliers date to apply it to your measure:

New measure =
VAR date_ =
    CALCULATE ( MIN ( DateTable[Date] ), ALLSELECTED ( DateTable[Date] ) )
RETURN
    CALCULATE ( [fx Average Value], DateTable[Date] = date_ )

If this doesn't work share the pbix

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

View solution in original post

4 REPLIES 4
AlB
Community Champion
Community Champion

@kalspiros 

I'd misread. Then use that earliers date to apply it to your measure:

New measure =
VAR date_ =
    CALCULATE ( MIN ( DateTable[Date] ), ALLSELECTED ( DateTable[Date] ) )
RETURN
    CALCULATE ( [fx Average Value], DateTable[Date] = date_ )

If this doesn't work share the pbix

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Hey AIB,

 

After several issues and tiny amendments on other slicers and filters, that now does the trick!

Glad that VAR is working in Excel as well (wasn't on BI environment) as i did try it in the past to no avail.

All in all, many thanks for your help on this and for opening the VAR unlimeted possibilites for me!

 

Kind Regards

AlB
Community Champion
Community Champion

Hi @kalspiros 

EARLIEST does not have anything to do with this but rather with nested row contexts. Check it out:  https://dax.guide/earliest/

Try

CALCULATE ( MIN ( DateTable[Date] ), ALLSELECTED ( DateTable[Date] ) )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

Many thanks AIB for your reply,

 

Even though the measure above does succesfully provide the first date of the slicer, i would be actually looking for it to return the [fx Average Value] on the first date of the slicer.

Let me provide some more context: i want to collapse all lines to zero on the first date of the slicer. i don't want these lines to eternally increase in the years to come. in a way, i want to benchmark these lines based on the desired start date. that is why the value on the earliest date is important so that i'll subtract it from my [fn Average Value]

 

Hope that helps!

 

Kind Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.