Forum Discussion
How to put multiple filter conditions in a query?
I have a query in which the No of "Complaints" and the "closed Complaint"time in average is visible. Now I want to see the number of "open Complaint" and the "average time" until they have acreated.
I haven´t found the link how I can do it in the Powerr BI coummunity. I am sure it is quite easy. if you know how to do it.
- Anonymous8 years ago
Many thanks. This brought me on the track. I just had to add another ;easure for the Investigation open time (InvOpen) .
then the solution looks like:
AvgOpenComplaint =
CALCULATE (
AVERAGE(RawData[InvOpen]),
FILTER (
ALLEXCEPT(RawData,RawData[KeyCustomer]),
RawData[StatusCategory] ="Investigation Open"))
6 Replies
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
Based on current description, it's not very clear about your requirement. Please post sample data in source table and show us your desired output.
How to Get Your Question Answered Quickly
Regards,
Yuliana Gu
- AnonymousNot applicable
This is the expected outcome- Instead of "StatusCategory" here it should show up the number of open complaints.
And at the right the average time of the open complaint.Below you see the raw data. The field "StatusCategory" can be used for this measure- I guess
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
For the number of open complaints, you can create below measure.
No of open complaints = CALCULATE ( DISTINCTCOUNT ( RawData[ComplaintNo] ), FILTER ( ALLEXCEPT ( RawData, RawData[KeyCustomer] ), StatusCategory = "Investigation Open" ) )For the average time of the open complaint, please provide more description about how to calculate.
Regards,
Yuliana Gu