Forum Discussion

JCtx's avatar
JCtx
New Member
3 years ago
Solved

Newbi - Help Filtering Matching Values Within the Same Table

Hello all! I'm new to Power BI and I'm sure there is a simple answer for this, but I'm stumped.   I have the following table: Each ticket_number with the type "Incident" should have a valu...
  • Jihwan_Kim's avatar
    3 years ago

    HI,

    I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.

     

     

     

    Incident count expected result: =
    VAR _currentrow =
        MAX ( Data[Ticket_number] )
    VAR _t =
        FILTER ( Data, Data[Type] = "Problem" )
    VAR _problem =
        FILTER ( ALL ( Data ), Data[Problem_id] = _currentrow )
    RETURN
        IF ( COUNTROWS ( _t ) = 1, COUNTROWS ( _problem ) + 0 )