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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jrous
New Member

Using a "New Column" to Count values in 4 other columns

Hi - I am brand new to Power BI - so my thanks in advance for your help to what I hope is a simple solution that I just haven't been able to find yet.

 

I have data that looks something like the following:data power bi.PNG

 

 

 

 

 

 

 

 

I want to be able to add a calculated column to the table in Power BI that shows "Number of Modules Completed", like this:

data power bi 2.PNG

 

 

 

 

 

 

 

 

Because ultimately what I would like to do is show a visualisation that shows the number of people that have completed 1, 2, 3, or 4 modules of the training:

data power bi 3.PNG

 

 

I thought perhaps I could do this by adding a "New Column" to the table in power bi, but using "COUNT" in the formula, counts up all the modules in the entire column - not on a per-row basis.  I essentially need the calculated column to count modules completed on a per-row basis.

 

Thanks for your advice!

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @jrous 

 

Try following

 

Column =
COUNTROWS ( FILTER ( { [Mod1], [Mod2], [Mod3], [Mod4] }, [Value] <> BLANK () ) )

Regards
Zubair

Please try my custom visuals

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

Hi @jrous 

 

Try following

 

Column =
COUNTROWS ( FILTER ( { [Mod1], [Mod2], [Mod3], [Mod4] }, [Value] <> BLANK () ) )

Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.