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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.