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
DionTN
Helper II
Helper II

Check DAX function Lastdate

 

LastValue =
VAR LaatsteWaarde =
    CALCULATE (
        MAX ( usermeasurements[AppointmentId] ),
        LASTDATE ( usermeasurements[OnderzoekVerichtOp] ),
        FILTER ( usermeasurements, usermeasurements[users.company.Name] = [Bedrijf] )
    )
RETURN
    LaatsteWaarde

 

It looks like this function is giving more than 1 output argument. How can I realise this is only 1 argument?

 

When I want to use "Laatste waarde" it returns an average of more than 1 value.

 

 

BodyComp4 =
VAR LS2 =
    CALCULATE (
        AVERAGE ( usermeasurements[BodyCompositionOverall] ),
        FILTER (
            usermeasurements,
            usermeasurements[users.company.Name] = [Bedrijf]
                && usermeasurements[AppointmentId] = [LastValue]
        )
    )
RETURN
    LS2 / 10

 

2 REPLIES 2
amitchandak
Super User
Super User

@DionTN ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

 I have an SQL connection so can only share the raw data.

https://drive.google.com/drive/folders/1tBe_K_oL6eNNYd9tanZc5X5vxMZfbv-8?usp=sharing

 

DionTN_0-1661181909816.png

My goal is to have the average of BodyComp4 based on the LastValue rows (and BodyComp3 based on the FirstValue rows)

 

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