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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
neees78
Helper II
Helper II

DAX expression for new column

Hello All, 

I've long table (+25 columns - all of date type) 

 

neees78_0-1624291251644.png

need DAX  for calculated column - just showing total number of records per  row. 

 

if 1 row has 3 date columns populated - then in my calculated column it should show 3 

 

hopefully this is easy ? 

 

thanks

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @neees78 ,

 

If you want to use calculated column, you need to unpivot all these columns. But you can add custom column in query editor since the blanl value show null in power query:

 

= Table.AddColumn(#"Replaced Value", "Custom", each List.Count(List.RemoveNulls(Record.ToList(_))))

 

Capture33.PNG

 

For more details, please refer to the pbix file.

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @neees78 ,

 

If you want to use calculated column, you need to unpivot all these columns. But you can add custom column in query editor since the blanl value show null in power query:

 

= Table.AddColumn(#"Replaced Value", "Custom", each List.Count(List.RemoveNulls(Record.ToList(_))))

 

Capture33.PNG

 

For more details, please refer to the pbix file.

 

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

 

Best Regards,

Dedmon Dai

jthomson
Solution Sage
Solution Sage

It'd be easier if you unpivoted those columns, but if for whatever reason you can't, you could just do some sort of monster if - isblank formula?

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 Kudoed Authors
Users online (2,167)