Forum Discussion

pb1202's avatar
pb1202
Frequent Visitor
5 years ago
Solved

Summarize a summarized table, as a measure

Hi all,   Got one question on creating a power BI measure that achieves the following function.   Problem set is like this: powerbi - Average of Grouped Sum - Stack Overflow A table Transactions...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi pb1202 

     

    Is it what you want?

     

    test =
    VAR T1 =
        GROUPBY (
            Transactions,
            Transactions[CustomerID],
            Transactions[Payment Type],
            "Total Spent", SUMX ( CURRENTGROUP (), Transactions[Total Transaction Amount] )
        )
    RETURN
        MEDIANX ( T1, [Total Spent] )