Forum Discussion

kemaley's avatar
kemaley
Frequent Visitor
2 years ago
Solved

How can I convert a value calculated measure to a static value.

I know that this question has been asked many times, but I have not been able to reach a conclusion by analyzing them. As can be seen in the code below, I want to add the total sales amount of the p...
  • kemaley's avatar
    2 years ago

    I have found solution

    Cumulative Sales = 
    VAR PreviousYearAmount =
    CALCULATE(
    SUMX (
        FILTER (
            'Sales',
            'Sales'[Year]<'Parameter Year'[Parameter Year Value]
        ),
    'Sales'[Amount]
    ),
    ALL(Months)
    )

    Thanks