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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Kish1999
Helper II
Helper II

How to get Max of date in case of multiple values

Hello All,

 

I have a situation in which some tasks are having multiple update dates and the update date for some tasks are blank. I wish to get the blank date for the ones that are blank but have to get the max date for the ones where multiple update are present.

Example:

TasknameUpdate date
  
A20-08-2022
A24-08-2022
B 
C21-08-2022
C22-08-2022
D23-08-2022
  
  
Expected Output 
  
TasknameUpdate date
  
A24-08-2022
B 
C22-08-2022
D23-08-2022

 

Can someone please help me write a measure for this.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Kish1999 ,

According to your description, you want to display the maximum date of each Taskname(The empty date should also be displayed in the visual). Right?

When the measure returns BLANK() , the visual object will be filtered by default, but we can solve this problem by creating a new index column in Power Query Editor.

Here are the steps you can follow:

(1)We can put [Taskname] and [Update date] field in the visual. We can also configure the  Format of [Taskname] field what you want.

vyangliumsft_0-1661755947974.png

(2)We can select Latest for the [Update date] field to display the maximum date in this Taskname.

vyangliumsft_1-1661755947979.png

(3)Then we can select Show items with no data in [Taskname] field to display the taskname who has no latest date.

vyangliumsft_2-1661755947982.png

(4)If you dont want to have Total in visual, you can close it in Format Pane.

vyangliumsft_3-1661755947985.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Kish1999 ,

According to your description, you want to display the maximum date of each Taskname(The empty date should also be displayed in the visual). Right?

When the measure returns BLANK() , the visual object will be filtered by default, but we can solve this problem by creating a new index column in Power Query Editor.

Here are the steps you can follow:

(1)We can put [Taskname] and [Update date] field in the visual. We can also configure the  Format of [Taskname] field what you want.

vyangliumsft_0-1661755947974.png

(2)We can select Latest for the [Update date] field to display the maximum date in this Taskname.

vyangliumsft_1-1661755947979.png

(3)Then we can select Show items with no data in [Taskname] field to display the taskname who has no latest date.

vyangliumsft_2-1661755947982.png

(4)If you dont want to have Total in visual, you can close it in Format Pane.

vyangliumsft_3-1661755947985.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

amitchandak
Super User
Super User

@Kish1999 , use this measure with Taskname in visual

 

maxx(filter(Table, not(isblank(Table[updateDate])) ), Table[updateDate])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello @amitchandak ,

 

This measure does give me the max date but it does not return  the value where the value is blank. In the above case, it does not return the task B. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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