Forum Discussion

jdballard30's avatar
jdballard30
Helper II
7 years ago
Solved

Create a measure with a filter

I have the following data; it's a table that is denormalized and is the result of the join of App and Transaction.   AppID     TransactionID     DaysBetweenEvents DEF       123               3 DE...
  • v-jiascu-msft's avatar
    7 years ago

    Hi jdballard30,

     

    You also can use a measure instead. There could be two approaches.

    Measure =
    AVERAGEX (
        DISTINCT (
            SELECTCOLUMNS (
                ProgramTransactions,
                "Col1", [AppId],
                "Col2", [DaysBetweenEvents]
            )
        ),
        [Col2]
    )
    
    Measure 2 =
    AVERAGEX (
        SUMMARIZE (
            'ProgramTransactions',
            'ProgramTransactions'[AppId],
            'ProgramTransactions'[DaysBetweenEvents]
        ),
        [DaysBetweenEvents]
    )
    

    Create-a-measure-with-a-filter

     

    Best Regards,
    Dale