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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Last Date in Direct Query

Is there a way to only get the last datetime per serial in a direct query?

3 REPLIES 3
Anonymous
Not applicable

this actually did work on a data set but now I am trying to do it on another larger imported data set and get the below error message

 

sbolton1855_0-1666678865452.png

 

Anonymous
Not applicable

I have used a meassure to get the last date but I am having a hard time figuring out how to target the last date record.

 

Last Date =
CALCULATE (
    LASTDATE ( Table[datetime] ),
    ALLEXCEPT ( 'Table', Table[serialnumber] )
)
Anonymous
Not applicable

Hi @Anonymous ,

 

Not sure, where do you want to use it? If it is visual, create a measure like:

Measure = IF(MAX('Table'[datetime])=[Last Date],1)

And apply it to the visual filter:

vcgaomsft_0-1665568799863.png

If this doesn't work or I misunderstand your needs, please feel free to let me know. It would be great to have disinfection data and expected output.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

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.