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
Anonymous
Not applicable

IF STAMENT TO MAKE A FLAG ON A TABLE

Capture11111111111.PNGhello can someone help me please

here what i want to do

i wrote a if statement to display in a column 1 or 0

if the date = to max date it should put 1 else 0

= IF('DATE DE DEMANDE'[DATE] = LASTDATE('DATE DE DEMANDE'[DATE]);1;0)

 

but i'm getting 1 on all the column

 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

=
var __thisDate = 'DATE DE DEMANDE'[DATE]
var __lastDateInTable = MAX( 'DATE DE DEMANDE'[DATE] )
return
	1 * (__thisDate = __lastDateInTable )

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

=
var __thisDate = 'DATE DE DEMANDE'[DATE]
var __lastDateInTable = MAX( 'DATE DE DEMANDE'[DATE] )
return
	1 * (__thisDate = __lastDateInTable )
Anonymous
Not applicable

thank you for your help 🙂

Anonymous
Not applicable

Thanks for giving Kudos 🙂

Best
D
Anonymous
Not applicable

Do you want to mark as 1 the last day in each year? In each month? Or only the very last date in the table? What's the logic?

Best
D
Anonymous
Not applicable

hello
i want to mark the very last date on the table as 1
like as you cas see the last date on the table is 19/02/2020 it should be mark as 1
juste that the table with grow and each time i'm on the max date  it should have 1 and the rest 0

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