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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PaulCz
New Member

Column with Highest Date in a year

Hi,

which formula do i have to use to calculate the highest date in a year? See Screenhot.

PaulCz_0-1740131469955.png

 

 

1 ACCEPTED SOLUTION

Hi there!

 

if you want to mark the highest date per year in your dataset, showing "True" for the last date of the year and "False" for others, please try this formula:

HighestDateInYear =
VAR MaxDateInYear =
CALCULATE(
MAX('YourTable'[Date]),
ALLEXCEPT('YourTable', 'YourTable'[Year])
)
RETURN
IF('YourTable'[Date] = MaxDateInYear, TRUE(), FALSE())

 

With this formula , MAX('YourTable'[Date]) will get the highest date.
and using ALLEXCEPT('YourTable', 'YourTable'[Year]) will keep the filter only on Year, ignoring other columns.

 

Hope this helps!

😁😁

View solution in original post

3 REPLIES 3
PaulCz
New Member

Thanks so much

Akash_Varuna
Super User
Super User

Hi @PaulCz You could achive this with custom column and grouping by year please try this

  • Group by Year:

    • Go to Transform > Group By.
    • Group the data by Year.
    • In the grouped table, create a column called MaxDate that calculates the Maximum Date.
  • Merge Back the Max Date:

    • Expand the grouped table to bring back the MaxDate for each year into the original table.
  • Create the Highest Date Column:

    • Add a Custom Column with the formula:
      if [Date] = [MaxDate] then "True" else "False"
      If this post helped please do give a kudos and accept this as a solution
      Thanks In Advance

Hi there!

 

if you want to mark the highest date per year in your dataset, showing "True" for the last date of the year and "False" for others, please try this formula:

HighestDateInYear =
VAR MaxDateInYear =
CALCULATE(
MAX('YourTable'[Date]),
ALLEXCEPT('YourTable', 'YourTable'[Year])
)
RETURN
IF('YourTable'[Date] = MaxDateInYear, TRUE(), FALSE())

 

With this formula , MAX('YourTable'[Date]) will get the highest date.
and using ALLEXCEPT('YourTable', 'YourTable'[Year]) will keep the filter only on Year, ignoring other columns.

 

Hope this helps!

😁😁

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.