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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
milomilo2020
Frequent Visitor

Get the MAX date for a particular filtered table

Hello, I have this table:

Columns: LastWeekDay, Date

milomilo2020_0-1655653956810.png

 

I need to create a column that brings the MAX LastWeekDay based on the applied filters. For example, If I have two weeks selected and the MAX Week is 23/12/2022, then the new column will show for every row, 23/12/2022

How can I achieve this in DAX?

 

Thanks

 

4 REPLIES 4
speedramps
Community Champion
Community Champion

Polite reminder.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1655661870788.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

milomilo2020
Frequent Visitor

Thanks for the quick response, let me share the logic: 

I have a calendar date with the following columns:

LastWeekDayDate
30/12/202224/12/2022
30/12/202225/12/2022
30/12/202226/12/2022
30/12/202227/12/2022
30/12/202228/12/2022
30/12/202229/12/2022
30/12/202230/12/2022
23/12/202217/12/2022
23/12/202218/12/2022
23/12/202219/12/2022
23/12/202220/12/2022
23/12/202221/12/2022
23/12/202222/12/2022
23/12/202223/12/2022

 

I need to have a chart with the latest 4 weeks, depending on the Filter applied to the Date column. So, for example, for one particular measure, I need to show in a line chart, that measure evolution the last 4 LastWeekDay depending on the filter applied.

speedramps
Community Champion
Community Champion

We want to help.

Please can you explain what you are trying to do.

Provide examples of your input dat (as tabels not screen shots)

and examples of the desired output

with a clear description of the steps.

Make sure you use the same fieldnames for input, output and the description so we understand you. 

 

Are you trying to get the start of week and end of week for each Date ?

That can be better done in Power Query 

https://docs.microsoft.com/en-us/powerquery-m/date-startofweek

https://docs.microsoft.com/en-us/powerquery-m/date-endofweek

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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