Forum Discussion

anon53427's avatar
anon53427
New Member
4 years ago
Solved

How to set up filter function correctly

Hi!    I'm fairly new to Power BI. I have two tables. One for groups and one for checks. Table "groups": group_id StartCount 1 16 2 32     Table "checks": group_id lost ti...
  • mahoneypat's avatar
    4 years ago

    Please try this expression instead.

     

    NewColumn =
    VAR startamt =
        RELATED ( Groups[StartCount] )
    VAR thistimestamp = Checks[timestamp]
    VAR losttodate =
        CALCULATE (
            SUM ( Checks[lost] ),
            ALLEXCEPT ( Checks, Checks[group_id] ),
            Checks[timestamp] <= thistimestamp
        )
    RETURN
        startamt - losttodate

     

    Pat