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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
YcnanPowerBI
Helper II
Helper II

Custom Column to count non-blank cells across columns

Hello

I am trying to count non blank fields across a row that are not in order.  As an example, I only want it to look at columns B,C,& E to provide that count.  How am I able to achieve this?

ABCDEFCount
204 5 41

 

Any help GREATLY appreciated.

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

3 REPLIES 3
YcnanPowerBI
Helper II
Helper II

Thank you! It worked!

v-jiewu-msft
Community Support
Community Support

Hi @YcnanPowerBI ,

If I understand correctly, the issue is that you want to count non-blank fields across a row. Please try the following methods and check if they can solve your problem:

1.Create the simple Table.

vjiewumsft_0-1706162936014.png

2.Select the table and click on New column to create a custom column.

vjiewumsft_1-1706162949404.png

3.Enter the following DAX formula for the new column.

Column = 
VAR CountB = IF(NOT(ISBLANK('Table'[B])), 1, 0)
VAR CountC = IF(NOT(ISBLANK('Table'[C])), 1, 0)
VAR CountE = IF(NOT(ISBLANK('Table'[E])), 1, 0)
RETURN CountB + CountC + CountE

 

4.Drag the new column into the table visual.

vjiewumsft_2-1706162956252.png

5.The result is shown below.

vjiewumsft_3-1706162964060.png

 

 

Looking forward to your reply.

Best Regards,

Wisdom Wu

 

 

 

Ahmedx
Super User
Super User

pls try this

Screenshot_1.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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