cancel
Showing results for
Did you mean:
Helper III

## Calculate the count which filter contains two conditions from different column

Hi Everyone,

I would like to create a metrix in PBI as below.

It is ok for me to create the measure about Resolved%. However, only P1-P3 Gap,# is different to realize.

My measure is:

The CALCULATE can't calculate the expression which contains multiple columns .

I need to calculate the count which "Column" = "No" and MappedPriority isn't P4-P5.

The Gap means the count of items which "Column" = "No".

Could you help me te solve this?

Regards

1 ACCEPTED SOLUTION
Microsoft

Hi @Kelly_Zhu,

```Measure 4 =
CALCULATE (
COUNT ( OpenBacklog[Column] ),
FILTER (
OpenBacklog,
AND ( OpenBacklog[Column] = "No", OpenBacklog[MappedPriority] <> "P4" )
)
)```

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 REPLIES 6
Frequent Visitor

I just wanted to say thanks for this solution, i'd been looking for over a day on an actual solution to filtering two specific values from two specific columns in a measure!

Microsoft

Hi @Kelly_Zhu,

Thanks,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper III

Microsoft

Hi @Kelly_Zhu,

```Measure 4 =
CALCULATE (
COUNT ( OpenBacklog[Column] ),
FILTER (
OpenBacklog,
AND ( OpenBacklog[Column] = "No", OpenBacklog[MappedPriority] <> "P4" )
)
)```

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper III

Hi Yuliana,

Thanks a lot!

BTW could you help me to hide the blank column?

Thanks,

Kelly

Microsoft

Hi @Kelly_Zhu,

Unfortunately, there is no such a visibility property to conditionally show/hide a column in matrix. you could submit your idea on the link below: https://ideas.powerbi.com/forums/265200-power-bi-ideas

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements