Forum Discussion

alann_contreras's avatar
alann_contreras
New Member
5 years ago
Solved

How accommodate time measure in table or matrix

Hi guys,

I hope you´re doing great!! I need your help for the next problem.

I have this data table:

 

 

 

 

 

 

I would like to have a view for the table or “matrix” that I can see the data to moving growth, for example, I want to have a view for growth information without losing the table time dynamism.

 

For this, I have created a measure that I can view the last year and the months for 2021, the formula and form are the following:

 

12 mm Compra = CALCULAR (SUMA (FCompras [Importe Entrada]),

    DATESBETWEEN (DCalendario [FechaID],

        SAMEPERIODLASTYEAR ( STARTOFYEAR (DCalendario [FechaID])),

            LASTDATE (DCalendario [FechaID])))

 

 

 

My question is the next, I would like to put the growth comparing the same months in different year (growth), that is to say, the month of purchase 1 for 2021 vs the month of purchase 1 for 2020 and insert in the table or “matrix”.

 

 

 

 

 

 

This is my expected end result without losing the dates dynamism. 




 

**** The option for I take is comparing the same formula with the same period for the last year, is not is possible to put a growth for file with time dynamism

 

 

 

 

Can anybody help me?

Thks for all.

Regards

  • Hi alann_contreras ,

     

    Try the following formula:

     

    measure = 
    DIVIDE(
        SUM(FCompras [Venta]), 
        CALCULATE( 
            SUM(FCompras [Venta]),
            ALL(DCalendario),
            SAMEPERIODLASTYEAR (DCalendario[Date])
        )
    ) - 1

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

2 Replies

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

    Hi alann_contreras ,

     

    Try the following formula:

     

    measure = 
    DIVIDE(
        SUM(FCompras [Venta]), 
        CALCULATE( 
            SUM(FCompras [Venta]),
            ALL(DCalendario),
            SAMEPERIODLASTYEAR (DCalendario[Date])
        )
    ) - 1

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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