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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

How to create autonumber field when my field is blank?

Hello, i need your help for create a new column, this column should be a column incremental when the field is blank or empty. This dax generate a column when the field is not empty, i need the viceversa.

 

 

Columna = If(TechSynergies[ID]<>BLANK(), CALCULATE(
COUNTROWS(TechSynergies),
FILTER(
TechSynergies,
'TechSynergies'[ID]<=EARLIER([ID]) && TechSynergies[ID]<>BLANK()
)
))
 
autoincremental.png

Best regards

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You need something that will allow you that.

If nothing add an index column https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

 

 

Try a new column

if(isblank(TechSynergies[ID]),countx(filter(TechSynergies , [index] <=earlier([Index]) && isblank(TechSynergies[ID]) ),TechSynergies[ID]), blank())

 

or  a new column

 

countx(filter(TechSynergies , [index] <=earlier([Index]) && isblank(TechSynergies[ID]) ),TechSynergies[ID])

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

I applied these dax but the field show all values empty or blank.id.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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