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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
p-caron
New Member

How to display the most recent value when grouping ?

Hi,

 

I'm starting with PowerBI, so my question is probably obvious ...

I have data that represent customers searches :

date | term | number of results | ....

 

I group my data by term with a slicer on time, no problem.

I have one row per term and the number of times customers make this search.
Now, I want to add a column to display the last (most recent) value of "number of results".

The idea is : During the last 2 month, I have 12345 searches on the keyword "mouse". It can be relevant for a marketer to know approximately how many products ours search engine actualy show for this search.

 

I try severals thing ... but I can not.

I want something like to get value associate with the LASTNONBLANK date ... but I didn't find.

 

Some help would be appreciate !

 

Regards,

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @p-caron 

 

Try this Measure if it works for you.

 

CALCULATE( 
    LASTNONBLANK( 'Table'[Text], 'Table'[Text] ), 
    LASTDATE( 'Table'[Date] ) 
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @p-caron 

 

Try this Measure if it works for you.

 

CALCULATE( 
    LASTNONBLANK( 'Table'[Text], 'Table'[Text] ), 
    LASTDATE( 'Table'[Date] ) 
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Thank you very much !

 

This is exactly what I want.

 

Regards,

Mariusz
Community Champion
Community Champion

@p-caron  always happy to help!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.