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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
LD1
Helper III
Helper III

Full year excluding the year's and month's selection

Hi, 

 

I would like some answers about those 3 questions please :

For example, below in blue columns, i have selected year 2022 and month from January to March. 

One formula : Turnover € (sum of all years)

 

1. What is the best formula for the first blue column depending on the selection (here is 2022 vs 2021) : YTD? or sameperiod last year ? 

2. What is the formula if i want to display the full year excluding the year's selection and also the month's selection :

3. Same question for 2021

 

Here is a little mock-up:

 

LD1_0-1658929282550.png

 

 

Thank you in advance, 

 

1 ACCEPTED SOLUTION
LD1
Helper III
Helper III

That's perfect ! Thank you. 

I have an other question in the same way.

What about the formula if i want to create a N-3 Full year ? (2019) 

Obviously it's different than PREVIOUSYEAR, but what is the best solution ?

 

Need your lights !

Thank you in advance

View solution in original post

4 REPLIES 4
LD1
Helper III
Helper III

That's perfect ! Thank you. 

I have an other question in the same way.

What about the formula if i want to create a N-3 Full year ? (2019) 

Obviously it's different than PREVIOUSYEAR, but what is the best solution ?

 

Need your lights !

Thank you in advance

v-kkf-msft
Community Support
Community Support

Hi @LD1 ,

 

Please try the measure.

 

Full Year 2019 =
CALCULATE ( [Turnover], DATEADD ( PREVIOUSYEAR ( Dates[Date] ), -2, YEAR ) )

 

Best Regards,
Winniz

v-kkf-msft
Community Support
Community Support

Hi @LD1 ,

 

Please try these measures.

 

YTD 2021 = 
CALCULATE ( [Turnover], SAMEPERIODLASTYEAR ( Dates[Date] ) )
Full Year 2021 = 
CALCULATE ( [Turnover], PREVIOUSYEAR ( Dates[Date] ) )
Full Year 2022 = 
CALCULATE ( [Turnover], ALL ( Dates[Date].[Month] ) )

vkkfmsft_0-1659339198661.png

 

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.

Greg_Deckler
Super User
Super User

@LD1 You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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