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
AngelaB
Helper I
Helper I

Create a new column with DAX to display latest date within another category

Hello

 

I am very new to PowerBI so I apologise if the language I'm using doesn't align with the correct Power BI terms and this question may be very basic. I come from a research background and am more familiar with data management from a statistical analysis point of view.

 

I have data that is filtered by site and grouped timepoint that I want to summarise in a visualisation. The trouble that I'm having is that rather than displaying Timepoint on my visualisation (see image below), I want to display the latest date that the data within that timepoint was collected. From my reading I suspect that I need to create a new column using DAX to do this (maybe using multipe if/return statements?) but can't work out how to write the command.

 

PowerBI.png

 

Here is the example data:

SiteTimepointDate
118/08/2023
118/08/2023
1128/08/2023
1213/09/2022
1211/09/2022
125/09/2022
2127/01/2022
2120/02/2022
211/03/2022
2215/09/2023
2212/09/2023
2211/09/2023

 

Here is what I *think* I need to solve my visualisation problem:

SiteTimepointDateLatest Date
118/08/202328/08/2023
118/08/202328/08/2023
1128/08/202328/08/2023
1213/09/202213/09/2023
1211/09/202213/09/2023
125/09/202213/09/2023
2127/01/20221/03/2023
2120/02/20221/03/2023
211/03/20221/03/2023
2215/09/202315/09/2023
2212/09/202315/09/2023
2211/09/202315/09/2023

 

Any advice about writing this DAX or alternative solutions would be very much appreciated!

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi AngelaB,

 

I created the same output in a calculated column as shown in your second table using dax as shown below:

Sakiko_0-1694574854455.png

Prior to that, I created the calculated calendar table and created a relationship between the dimension table and the fact table. 

Sakiko_1-1694574970203.png

I attach the link to the pbix file below:

latest date within another category.pbix

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi AngelaB,

 

I created the same output in a calculated column as shown in your second table using dax as shown below:

Sakiko_0-1694574854455.png

Prior to that, I created the calculated calendar table and created a relationship between the dimension table and the fact table. 

Sakiko_1-1694574970203.png

I attach the link to the pbix file below:

latest date within another category.pbix

Thank you so much and for such a quick reply! That has worked perfectly. Thank you also for the .pbix file; Your explanation was clear, but having the file made it very simple to follow.

What a great community 🙂

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.