Forum Discussion

pedroccamaraDBI's avatar
pedroccamaraDBI
Post Partisan
5 years ago
Solved

wrong measure in calculation group

Hi guys,
I have 4 main measures, cost, net, profit and gross. I've done a calculation group with tabular editor to calculate several ti measures like LM, LQ and LY.
My LY measure is not working, for any of the measures selected.
This is my calculated item :

 CALCULATE( SELECTEDMEASURE(), DATEADD( 'Tab Dates'[Date], -1, YEAR ))

Pretty simple and it's not working. My first time in calculation groups. This is my visual:

Can anyone help me?
Thanks a lot
Pedro

  • Hi pedroccamaraDBI

     

    Please try measure as:

    CALCULATE( SELECTEDMEASURE(),PREVIOUSYEAR( 'Tab Dates'[Date])

     If you still have the problem, please share your sample pbix file, that will be a great help.

     

    Best Regards,
    Link

     

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

3 Replies

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Community Support

    Hi pedroccamaraDBI

     

    Please try measure as:

    CALCULATE( SELECTEDMEASURE(),PREVIOUSYEAR( 'Tab Dates'[Date])

     If you still have the problem, please share your sample pbix file, that will be a great help.

     

    Best Regards,
    Link

     

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