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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JappieD
New Member

How do I get the last date (with date table)

Hi, 

 

I need to visualize the last date per categorie. When I do a Max(date[date[), it will show the last date of my date dable, that is somewhere in 2027. I need to know per categorie which day the last run was. Someone has any clue how to get to this point?

 

Capture.PNG

1 ACCEPTED SOLUTION

This is how you get the latest date that's in the current context:

[Latest Date] =
MAXX(
    SUMMARIZE(
        FactTable,
        DateDimension[Date]
    ),
    DateDimension[Date]
)

// or even simpler...

[Latest Date] = MAX( FactTable[Date] )

// where the Date field is the one
// that joins the fact table and
// the dim.

 

View solution in original post

8 REPLIES 8
Samarth_18
Community Champion
Community Champion

Hi @JappieD ,

 

You can just summerize your Date column as Latest as shown below:-

image.png

image.png

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hi, 

 

Thanks for your comment. Tried that but it gives me the last value of my date table. Capture.PNG

@JappieD Do you have relationship between date table and actual table?

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Capture.PNG

@Samarth_18 here a photo of the relationship. 

@JappieD So you are taking Categories from the dmt_bhr DimSchema and date from the dmt_bhr DimDate(2) right?

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

@Samarth_18 yes, that is correct. If i try it with 'pipeline run' from the fact table', it doesn't work either. 

 

This is how you get the latest date that's in the current context:

[Latest Date] =
MAXX(
    SUMMARIZE(
        FactTable,
        DateDimension[Date]
    ),
    DateDimension[Date]
)

// or even simpler...

[Latest Date] = MAX( FactTable[Date] )

// where the Date field is the one
// that joins the fact table and
// the dim.

 

@daXtreme It worked, thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors