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
Sentinel997
Frequent Visitor

Show only record with current date

 

 

In a report, I get several data records under storage date (Einlagerungsdatum).
Some of these records have the same chassis number.
Does anyone have an idea that only the most recent (date) record is displayed?

Sentinel997_0-1658304316640.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sentinel997 ,

 

Method1: Change the summarized type as "Latest":

Eyelyn9_0-1658813122003.png

Method2:  Create a measure: 

Latest Date = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[FZFZTP]=MAX('Table'[FZFZTP])))

Eyelyn9_1-1658813220818.png

Method3: If you just want to display the latest row, please follow @jbwtp 's method to create a flag measure for filter:

Filter Flag = 
var _latest=CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[FZFZTP]=MAX('Table'[FZFZTP])))
return IF(MAX('Table'[Date])=_latest,1,0) 

And then apply it to visual-level filter pane, set as "is 1":

Eyelyn9_2-1658813418975.png

 

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

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Sentinel997 ,

 

Method1: Change the summarized type as "Latest":

Eyelyn9_0-1658813122003.png

Method2:  Create a measure: 

Latest Date = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[FZFZTP]=MAX('Table'[FZFZTP])))

Eyelyn9_1-1658813220818.png

Method3: If you just want to display the latest row, please follow @jbwtp 's method to create a flag measure for filter:

Filter Flag = 
var _latest=CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[FZFZTP]=MAX('Table'[FZFZTP])))
return IF(MAX('Table'[Date])=_latest,1,0) 

And then apply it to visual-level filter pane, set as "is 1":

Eyelyn9_2-1658813418975.png

 

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

jbwtp
Memorable Member
Memorable Member

hi @Sentinel997,

 

This is probably more a DAX quesiton, not Power Query.

I think you can create a measure and then filter on it. Something like this:

Measure = if(CALCULATE(MAX('Table'[Month]), All('Table'[Month])) = MAX('Table'[Month]), 1, 0)

Where Table is the name of your data table and the Month is Einlagerungsdatum.

 

Kind regards,

John 

Thanks,

I also think, it must be a DAX query.

I made the entry.

Sentinel997_0-1658381414631.png

However, I get an error that at least 2 arguments are required.

 

I'm not good at DAX. Can create a query using DAX:


If the "Fahrgestellnummer" appears twice, then only use the latest "Einlagerdatum".

 

Kind regards

Anthony

  

I think there is a missing closing bracket before "=MAX" in the formula (and I guess, once you fix it there will be one redundant closing bracket at the end of the equasion).

thanks for the hint.
However, it still doesn't work.

Hi @Sentinel997,

 

This is because, I've ignored that you have more columns and they are also varied across same vehicle type.

Try this one and see if this works for you:

 

Measure = if(CALCULATE(MAX(RRDVREP[Einlagerungsdatum]), ALLEXCEPT(RRDVREP,RRDVREP[FZFZTP])) = MAX(RRDVREP[Einlagerungsdatum]), 1, 0)

 

 

Cheers,

John

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.