Forum Discussion

LuisLOCapelari's avatar
1 year ago
Solved

Annual comparison chart

Hello everyone, I'm Luis, Brazilian. I would like help creating a graph in which I can compare two years in two lines. I'm analyzing a company's revenue and I need to compare a desired year with any ...
  • MFelix's avatar
    MFelix
    1 year ago

    Hi LuisLOCapelari ,

     

    Try the following code:

    Medida Dinamica Outro Ano Acumulado = 
    var AnoComparativo = [Valor Parâmetro]
    
    RETURN 
    CALCULATE([Medida Dinamica Comparativo Acumulado], DIM_DATA[Ano] = AnoComparativo , REMOVEFILTERS(DIM_DATA[Ano]))

    See file attach.