Forum Discussion

bohon79's avatar
bohon79
New Member
3 years ago
Solved

create measure with multiple filters

Good Afternoon

 

Try to create a measure that filters down to a correct count of rows.  Any help would be greatly apprecieated as i am still a novice and learning how Power Bi works.  The columns i am trying to filter are as follows:

 

Subject need to have this show as Count (Distinct)

Complete = No

Late (Stage) = Yes

Activated Date = is not blank

Action Date = is blank

 

Any help would be awesome.

 

THank you 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi bohon79 ,

     

    I think you can use "&&" as and function in filter part. Your code should look like as below.

    Distinct Count with multiple filters =
    CALCULATE (
        DISTINCTCOUNT ( 'TableName'[Subject] ),
        FILTER (
            'TableName',
            'TableName'[Complete] = "No"
                && 'TableName'[Late (Stage)] = "Yes"
                && 'TableName'[Activated Date] <> BLANK ()
                && 'TableName'[Action Date] = BLANK ()
        )
    )

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi bohon79 ,

     

    I think you can use "&&" as and function in filter part. Your code should look like as below.

    Distinct Count with multiple filters =
    CALCULATE (
        DISTINCTCOUNT ( 'TableName'[Subject] ),
        FILTER (
            'TableName',
            'TableName'[Complete] = "No"
                && 'TableName'[Late (Stage)] = "Yes"
                && 'TableName'[Activated Date] <> BLANK ()
                && 'TableName'[Action Date] = BLANK ()
        )
    )

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

    • bohon79's avatar
      bohon79
      New Member

      again thank you for your help.  have one more.  is there a way to now take this and get the average days late from another column. keep trying other ways and not coming to the answer i am manually getting.  the column name is [days late].  once i have the filter and then add up the days Late column to come out to an adverage.