Forum Discussion

a-rychen's avatar
a-rychen
New Member
7 years ago
Solved

How to use Contains with condition in Summarize

Hi guys,   I am new to power BI, and got a DAX problem.   I Have Historic data as below   [Historic Table]   GUID      |  Date  |  DeviceID  |   Alert ---------------------------------------...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi a-rychen ,

    Please use following calculate table formula to create summary table:

    Summary table =
    ADDCOLUMNS (
        SUMMARIZE ( Table1, [DeviceID], "L Date", MAX ( Table1[Date] ) ),
        "Alert", COUNTROWS (
            FILTER (
                ALL ( table1 ),
                [DeviceID] = EARLIER ( [DeviceID] )
                    && [Date] = EARLIER ( [L Date] )
                    && [Alert] = 1
            )
        ) > 0
    )
    

    Regards,

    Xiaoxin Sheng