Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Is there a way to implement a "COUNTIF" Excel function in Power Query for a custom column? Preferably without having to write formulas to check the value of each column individually?
For example, for each row, I'd like a count of the number of columns that have a specific value (value = 6). See screenshot below from Excel, with the desired result in column J and formula in column K.
The only way I've found so far is to do something like this, but this becomes cumbersome if dealing with many columns (100+).
Any help is appreciated!
My suggestion is to begin by using UNPIVOT OTHER COLUMNS, then use GROUPBY, then do a COUNT for your specific value
Thanks for the suggestion. Where can you implement a COUNT for a specific value? All of the options I am able to find only do a count of the number of rows.
It should already count for you.
Here's my example:
Select the Nodes columns >> Unpivot Columns >> Filter Values = 6 >> Group by Date and Node and count the rows.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 36 | |
| 33 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 72 | |
| 38 | |
| 35 | |
| 26 |