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
Anonymous
Not applicable

How to do a COUNTIF across rows

Hi All,

 

I'm trying to work out how to do a countif across a single row of data.  

 

Example of my work is 

Capture.JPG

 

 

 

 

 

Where:

1 = Not Required

2 = Required

3 = Sent

4 = Retry

 

The standard formula I know I can use in excel is =COUNTIF(A3:H3,1) and it will return 2 in J3 and with minor variances, it will return 6 in K3 and so on. I also know in the COUNTIF function I can utilise the word "Not Required" if the data wasn't converted to a numeric value and it will still return the same results

 

Capture2.JPG

 

How do you do this in a PowerBi desktop? 

 

Cheers,

 

Sandii

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous 

Better you unpivot and create a measure and pivot it in Matrix Visual

https://radacad.com/pivot-and-unpivot-with-power-bi

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous 

Better you unpivot and create a measure and pivot it in Matrix Visual

https://radacad.com/pivot-and-unpivot-with-power-bi

Anonymous
Not applicable

Hi Amitchandak! @amitchandak   

 

Thanks for that, I didn't think to pivot would work but that has fixed my issue and haven't bothered to unpivot the data as it can stay that one for that one table. 

 

Can do the same for similar data within the same dataset.  

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.