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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bschil98
Frequent Visitor

Dax Expression that only displays value for first in list

I have a table of values that is comprised of names, dates, and a host of other fields. In numerous instances, the name will be tied to the same date while other columns are the differentiator. I am trying to create a calculated column that yields 1 if that is the first time the Name+date appear in the list. For all the subsequent times that name+date appears, I want it to return 0. Is this possible? Take the below screenshot as a reduced example: 

bschil98_0-1691019113324.png

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@bschil98 

you can create an index column in PQ

 

then create a calucalted column

 

Column = 
VAR _last=maxx(FILTER('Table','Table'[name]=EARLIER('Table'[name])&&'Table'[date]=EARLIER('Table'[date])&&'Table'[Index]<EARLIER('Table'[Index])),'Table'[date])
return if (ISBLANK(_last),1,0)

11.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@bschil98 

you can create an index column in PQ

 

then create a calucalted column

 

Column = 
VAR _last=maxx(FILTER('Table','Table'[name]=EARLIER('Table'[name])&&'Table'[date]=EARLIER('Table'[date])&&'Table'[Index]<EARLIER('Table'[Index])),'Table'[date])
return if (ISBLANK(_last),1,0)

11.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors