Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pedroccamaraDBI
Post Partisan
Post Partisan

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:
Capture.JPG
Can anyone help me?
Thanks a lot
Pedro

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
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.

View solution in original post

3 REPLIES 3
v-xulin-mstf
Community Support
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.

amitchandak
Super User
Super User

@pedroccamaraDBI , is Tab Dates is calendar table marked as date table?

also, Year/Q/M is coming from Tab Dates?

 

refer Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw

yes @amitchandak for both questions

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.