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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
StuartSmith
Power Participant
Power Participant

Display most recent date in table.

I have the below report and need the report to only show the most recent rows for each country/carrier, so as an example it would show the 2 rows highlighted.  I have searched on here and found a few similar questions, but nothing that i can re-use.

 

Any ideas? Thanks in advance.

 

2020-09-08_15-51-02.jpg

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @StuartSmith 

 

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

Table:

a1.png

 

You may create a measure as below.

Visual Control = 
var tab = 
SUMMARIZE(
    ALL('Table'),
    'Table'[Country],
    'Table'[Carrier],
    "LastDate",
    MAX('Table'[Explicit Invoice Ymv])
)
var _date =
MAXX(
    FILTER(
        tab,
        [Country]=SELECTEDVALUE('Table'[Country])&&
        [Carrier]=SELECTEDVALUE('Table'[Carrier])
    ),
    [LastDate]
)
return
IF(
    SELECTEDVALUE('Table'[Explicit Invoice Ymv])=_date,
    1,0
)

 

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

a2.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.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Do you want this at the leve of the Query Editor or only at the level of the visual? 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-alq-msft
Community Support
Community Support

Hi, @StuartSmith 

 

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

Table:

a1.png

 

You may create a measure as below.

Visual Control = 
var tab = 
SUMMARIZE(
    ALL('Table'),
    'Table'[Country],
    'Table'[Carrier],
    "LastDate",
    MAX('Table'[Explicit Invoice Ymv])
)
var _date =
MAXX(
    FILTER(
        tab,
        [Country]=SELECTEDVALUE('Table'[Country])&&
        [Carrier]=SELECTEDVALUE('Table'[Carrier])
    ),
    [LastDate]
)
return
IF(
    SELECTEDVALUE('Table'[Explicit Invoice Ymv])=_date,
    1,0
)

 

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

a2.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.

amitchandak
Super User
Super User

@StuartSmith , use these with region, countru carrier

measures

last No of SIM = lastnonblankvalue(table[explict Invoice YMv] , max(Table[No of SIM]))
last net amount = lastnonblankvalue(table[explict Invoice YMv] , sum(Table[net amount]))

 

use max of table[explict Invoice YMv]

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
edhans
Community Champion
Community Champion

Hi @StuartSmith - you can create a Top N filter on that date field. Select the visual, then the Filter Pane.

  1. Change the filter type to Top N
  2. Show top 1 items
  3. Drag that date field into the By Value and change it to show the latest value.

 

edhans_0-1599578946357.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.