Forum Discussion

Omega's avatar
Omega
Impactful Individual
6 years ago
Solved

Multi aggregation for last date that has data

Hi,    I am connected to SSAS (live connection) and can't do changes to the model by creating columns. I have the below tables with follwing connection:      Factor Master [Customer Code] ...
  • v-eachen-msft's avatar
    6 years ago

    Hi Omega ,

     

    You could create a new measure to sum your Measure 3.

    Measure 4 =
    VAR _table =
        ADDCOLUMNS (
            CROSSJOIN (
                VALUES ( 'Customer Master'[Customer] ),
                VALUES ( 'Customer Master'[City] )
            ),
            "v", [Measure 3]
        )
    RETURN
        SUMX ( _table, [v] )

    I cannot follow your measures to get the result, so I made some changes in these measures.

    Here is the result.

    Here is the test file for your reference.