SOLVED

Power Query: COUNTIFS

Copper Contributor

Hello,

I am struggling to achieve below CountIfs-Formula in PowerQuery. 

Any suggestions would be highly welcome!

Thank you

JDB79

PowerQuery_CountIfs.jpg

 

 

5 Replies

@JDB79 

I'm certainly not the most suitable to submit a suggestion to you, but I'll give myself a try :).

Here is a small example .

 

would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

 

 

@JDB79 

Steps could be

- Group table by Number without aggregation (All Rows)

image.png

- add custom column to filter each of tables on "B"

image.png

- add another custom column to count number of rows in each such table

image.png

(above 3 steps could be combined in one in formula bar)

- in resulting table

image.png

keep only these columns

image.png

expand Count column and land result into the grid

image.png

Please check in attached file.

best response confirmed by JDB79 (Copper Contributor)
Solution

@Sergei Baklan 

Hello, 

Many thanks. Yes, this will work for me.

 

Thank you.

 

JDB79

 

Hallo,
Vielen Dank für die Mühe. Problem ist für mich gelöst.
:)
P.S. Bin sogar auf eine weitere Lösung gestoßen:
https://stackoverflow.com/questions/53305097/countifs-equivalent-in-power-query-m-counts-per-row-wit...

Problem ist für mich gelöst.

@JDB79 , glad it helped

1 best response

Accepted Solutions
best response confirmed by JDB79 (Copper Contributor)
Solution

@Sergei Baklan 

Hello, 

Many thanks. Yes, this will work for me.

 

Thank you.

 

JDB79

 

View solution in original post