Showing results for 
Search instead for 
Did you mean: 
mathieu_thelot Frequent Visitor
Frequent Visitor

Refresh Timsetamp Column apply to each group

In power bi desktop I'm searching to create a new column in a table
In my table "table_1", I have this kind of columns :

Group timestamp value
A 14/01/2016 5
B 14/01/2016 4
C 14/01/2016 6
A 16/01/2016 8
B 16/01/2016 7
A 20/01/2016 12

So to recape, at the end we have :
Group timestamp value
A 14/01/2016 12
B 16/01/2016 7
C 20/01/2016 6

I want to create a column "refresh":
First, we need to select the last timestamp (= 'last_global')
Then, we need to select for each group the actual last timestamp (='last').
After that, we need to check for each group :
if timestamp ='last' then return in "refresh" the 'last_global'
for each group if timestamp not last , then return timestamp

To be more explicit :


Group timestamp value | Refresh |
A 14/01/2016 5 | 14/01/2016 |
B 14/01/2016 4 | 14/01/2016 |
C 14/01/2016 6 | 20/01/2016 |
A 16/01/2016 8 | 16/01/2016 |
B 16/01/2016 7 | 20/01/2016 |
A 20/01/2016 12 | 20/01/2016 |

Refresh is not a measure but a column :

I want to have in my table something like this:

somewhere in my table:
Group timestamp value | Refresh |
A 14/01/2016 12 | 20/01/2016 |
B 16/01/2016 7 | 20/01/2016 |
C 20/01/2016 6 | 20/01/2016 |

If you have any proposition, don't hesitate
I suggest to stay in the same table but if it's easyer with an other method, I'm ok with that 😉

Moderator v-qiuyu-msft

Re: Refresh Timsetamp Column apply to each group

Hi @mathieu_thelot,


I'm not very clear about your requirement. How did you get 'last_global' and 'last'? If you want to get the last timestamp within each group value, you can create a table use the expression like below:


Table = SUMMARIZE('table_1','table_1'[Group],"last",LASTDATE('table_1'[timestamp]),"value",SUM('table_1'[value]))




If you have any question, please feel free to ask.


Best Regards,
Qiuyun Yu


Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)