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
sanchar123
Helper I
Helper I

DAX query HELP (it is lookup/firstnonblank/measure??)

hi team.

loadNum(incremental)notification(1 or 2 or 3)Desired Column
300
300
300
300
300
3299
3099
3099
31399
3099
3099
31699
3099
3099
3099
400
400
400
4199
4099
4099
4099
4099
41699
4099
500
500
500
5399
5099
5099
5099

LoadNumber is incremental and i want only first few values till I hit first value (1or2or3)from column 2. rest all can be any value.

 

Please let me know how can it be done.

Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@sanchar123 ,

Add a index column https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi


then try a new column

new column =
var _1 = minx(filter(Table,[loadNum(incremental)] = earlier([loadNum(incremental)]) && [notification(1 or 2 or 3)] =0),[Index])
var _2 = [loadNum(incremental)]
return
if([loadNum(incremental)] =_2 && [Index] >= _1, 99,0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
sanchar123
Helper I
Helper I

@amitchandak  Awesome solution!! thanks a ton!

amitchandak
Super User
Super User

@sanchar123 ,

Add a index column https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi


then try a new column

new column =
var _1 = minx(filter(Table,[loadNum(incremental)] = earlier([loadNum(incremental)]) && [notification(1 or 2 or 3)] =0),[Index])
var _2 = [loadNum(incremental)]
return
if([loadNum(incremental)] =_2 && [Index] >= _1, 99,0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi,

 

If I understood your issue correctly then my suggestion will be to do as follows -

  • Clean up your table to remove duplicates.
  • Use FIRSTNONBLANK to get the incremental loadnum.

Best Regards,

PG

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.