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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jps_HHH
Helper II
Helper II

count when column is filled in

I have a table with several dates column to be filled in. 

 

Batch1 dilevery date1 dilevery date3 dilevery date4 dilevery date
A2024.09.02   
B2024.12.022025.04.022025.07.022025.09.02
C2024.10.02   
D2024.03.022024.04.022024.05.02 

 

I would like to create a new column (using tranformation data) to count the number of columns filled in i.e. the number of deliveries. 

For batch A is 1; batch B is 4; batch C is 1; batch D is 3

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @jps_HHH - you can create it using a function List.functon as follows in to get the delivery date columns

In the Power Query Editor, click on "Add Column" in the ribbon.Select "Custom Column" from the dropdown menu.

 

List.NonNullCount({[1 dilevery date],[2 dilevery date],[3 dilevery date],[4 dilevery date]})

 

rajendraongole1_0-1725288284772.png

output:

rajendraongole1_2-1725288414118.png

 

Hope it works 

 

 

 





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

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @jps_HHH - you can create it using a function List.functon as follows in to get the delivery date columns

In the Power Query Editor, click on "Add Column" in the ribbon.Select "Custom Column" from the dropdown menu.

 

List.NonNullCount({[1 dilevery date],[2 dilevery date],[3 dilevery date],[4 dilevery date]})

 

rajendraongole1_0-1725288284772.png

output:

rajendraongole1_2-1725288414118.png

 

Hope it works 

 

 

 





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

Proud to be a Super User!





SamWiseOwl
Super User
Super User

Are there always 4 date columns?

If so something like this should do the trick:
= Table.AddColumn(#"Changed Type1", "Count", each List.NonNullCount({[1 dilevery date_1], [3 dilevery date], [4 dilevery date]}), Int64.Type)


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

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.