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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ferbyrez
Helper II
Helper II

Calculated Column => IF date < MAX date[column]

Hi guys, first of all thanks for helping.

 

I think the image below explains easily the problem (I want to created the "New Column" inside my table.

Doubtdate.png

 

I was trying to return the "max date" per line with the code above, but it´s not working "per line", it was returning the max table total (same value per line).

I need it per line, because I gonna use as a filter in my "presentation table".

VAR __id=
SELECTEDVALUE (column[id] )
VAR __calculate=
calculate ( max (table[interview date], filter [table, [interview date] = __id
RETURN
__calculate
 
thanks!
1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hello @ferbyrez ,

I understand that you want to use the MAX date of the interview date to compare with the date of the interview. If my understanding is correct, please keep looking. If my understanding is wrong, please tell me more details. It is best to present myself in the form of screenshots or forms.

1.My sample data is as follows. I have more IDs because I think it's better to show.

samp.png

2. I write the test measurement based on your image.

Test = IF(MAX('Table'[Interview Date])<MAX('Table'[Creation Date]),"Yes","No")

3. The Maximum date measurement is as follows. I use the ALLEXCEPT function.

Max Date = CALCULATE(MAX('Table'[Interview Date]),ALLEXCEPT('Table','Table'[ID]))

4. The new column you want to create is written with measure.

Measure = IF('Table'[Test]="Yes",IF(MAX('Table'[Interview Date])<[Max Date],"Yes"))

re.png

More details can be found here.

Best regards

Icey

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

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hello @ferbyrez ,

I understand that you want to use the MAX date of the interview date to compare with the date of the interview. If my understanding is correct, please keep looking. If my understanding is wrong, please tell me more details. It is best to present myself in the form of screenshots or forms.

1.My sample data is as follows. I have more IDs because I think it's better to show.

samp.png

2. I write the test measurement based on your image.

Test = IF(MAX('Table'[Interview Date])<MAX('Table'[Creation Date]),"Yes","No")

3. The Maximum date measurement is as follows. I use the ALLEXCEPT function.

Max Date = CALCULATE(MAX('Table'[Interview Date]),ALLEXCEPT('Table','Table'[ID]))

4. The new column you want to create is written with measure.

Measure = IF('Table'[Test]="Yes",IF(MAX('Table'[Interview Date])<[Max Date],"Yes"))

re.png

More details can be found here.

Best regards

Icey

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

it worked.. thanks a lot bro !

amitchandak
Super User
Super User

@ferbyrez , not very clear - max by line

New column = max (table[interview date], table[created date])

or


cumm column= maxx(filter(Table, [ID] = earlier([ID]) ),[interview date] )

 

or a new measure

calculate(max(Table[interview date]), allexcept(Table, Table[ID))

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.