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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mathieu_thelot
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'
or
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 😉

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

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]))

 

w1.PNG

 

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

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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