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
cjramsey22
Regular Visitor

Count all cells in a row that have a specified value

I'm using a sharepoint db that has about 70 columns and around 3000 rows long. I need to count the number of times each row has an entry with the word "Verified". 

 

I tried wtih Progress = COUNTAX('TABLE', "Verified")

 

I've been searching on here for an hour and no luck. Seems like this would have been very simple in excel.

 

SiteAccessDirectionsEquipmentDatabasesContractorsProgress
Site1VerifiedVerifiedIncompleteVerifiedN/A3
Site2VerifiedVerifiedVerifedN/AN/A3
Site3VerifiedVerifiedVerifiedVerifiedVerified5
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @cjramsey22 

In the query editor you can unpivot the other columns so you have [Site] [Attribut] [Value] then you can do a count of the lines where the value = "Verified"

 

In the query editor select the site column

Go to Transform

Unpivot Columns > Unpivot Other Columns

2020-04-20_14-05-31.jpg

Verified Count = 
CALCULATE(
    COUNTROWS( 'Table' ),
    KEEPFILTERS('Table'[Value] = "Verified")
    )

2020-04-20_14-07-49.jpg

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @cjramsey22 

In the query editor you can unpivot the other columns so you have [Site] [Attribut] [Value] then you can do a count of the lines where the value = "Verified"

 

In the query editor select the site column

Go to Transform

Unpivot Columns > Unpivot Other Columns

2020-04-20_14-05-31.jpg

Verified Count = 
CALCULATE(
    COUNTROWS( 'Table' ),
    KEEPFILTERS('Table'[Value] = "Verified")
    )

2020-04-20_14-07-49.jpg

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.