Forum Discussion

Moya_Novaes's avatar
Moya_Novaes
Frequent Visitor
7 years ago
Solved

Vertical Analysis - not being filtered horizontally

Lately I've been trying to make a vertical analysis without sucess. I've tried the following measures:

ReceitaOperacionalLiquida = calculate(sum(value), 
filter( all( my_table ), [Level1] = "(=) RECEITA OPERACIONAL LÍQUIDA" ))

This variable would have to show how much Net Revenue each month-year has so I could use it to the next measure that will tell me the vertical comparison. The results where not the expected as shown in this picture:


In it I show you that the measure I created is not altering from month-year to month-year. Could anyone give me some hints in how to solve this?

  • Moya_Novaes ,

     

    In general, suppose you in your table you have another columns [Category] and [Date], you may modify your measure like below:

     

    ReceitaOperacionalLiquida =
    CALCULATE (
    SUM ( my_table[value] ),
    FILTER (
    ALLEXCEPT ( my_table, my_table[Date], my_table[Category] ),
    [Level1] = "(=) RECEITA OPERACIONAL LÍQUIDA"
    )
    )

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    Moya_Novaes ,

     

    In general, suppose you in your table you have another columns [Category] and [Date], you may modify your measure like below:

     

    ReceitaOperacionalLiquida =
    CALCULATE (
    SUM ( my_table[value] ),
    FILTER (
    ALLEXCEPT ( my_table, my_table[Date], my_table[Category] ),
    [Level1] = "(=) RECEITA OPERACIONAL LÍQUIDA"
    )
    )

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.