Forum Discussion
CountIF by rows in multiple columns on powerquery
- 4 years ago
Hi Pivotable78 ,
According to your description, here's my solution.
1. In Power Query, select the columns "Monday, Tuesday, Wednesday, Thursday, Friday" (Ctrl+select).
2. Click "Unpivot Columns" tab under the Transform ribbon.
Get this table.
3.Create two measures.
Count on field = CALCULATE ( COUNT ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Rep], 'Table'[Month] ), 'Table'[Value] = "On field" )Count out field = CALCULATE ( COUNT ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Rep], 'Table'[Month] ), 'Table'[Value] = "Out of field" ) + 0Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Pivotable78 ,
According to your description, here's my solution.
1. In Power Query, select the columns "Monday, Tuesday, Wednesday, Thursday, Friday" (Ctrl+select).
2. Click "Unpivot Columns" tab under the Transform ribbon.
Get this table.
3.Create two measures.
Count on field =
CALCULATE (
COUNT ( 'Table'[Value] ),
ALLEXCEPT ( 'Table', 'Table'[Rep], 'Table'[Month] ),
'Table'[Value] = "On field"
)
Count out field =
CALCULATE (
COUNT ( 'Table'[Value] ),
ALLEXCEPT ( 'Table', 'Table'[Rep], 'Table'[Month] ),
'Table'[Value] = "Out of field"
) + 0
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Pivotable784 years agoNew Member