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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Till
Resolver II
Resolver II

Growth rate

I have a calendar from 01/01/2018 until today.
I want to compare the Groth rate for this year with last year from my table Revenue.
Now unfortunately it also shows me the Groth rate in January 2020 from 2019.
and from February 2020 the rate from 2019.
How do I get only 2020 and 2021 displayed for January and February?

Screenshot 2021-04-17 055919.png

Measure:

f_05_revenue_actual_month_2020_mdt =
CALCULATE (
SUM ( 'sql_revenue'[value] ),
'sql_revenue'[type_1] = "ACTUAL",
'sql_revenue'[type_2] = "revenue",
'sql_revenue'[ver_desc] = 1,
SAMEPERIODLASTYEAR(tbl_calendar[Date])
)

Thanks for help.


 

Kind regards

1 ACCEPTED SOLUTION
Gabriel_Walkman
Continued Contributor
Continued Contributor

Hi.

SAMEPERIODLASTYEAR does what is says. If you filter your calendar table to show only 2021, the graph should display results for 2020 and 2021.

Your measure name indicates you want a value spesifically for the year 2020? That sounds a bit like bad practice. What happens when next year comes?

View solution in original post

3 REPLIES 3
Gabriel_Walkman
Continued Contributor
Continued Contributor

Hi.

SAMEPERIODLASTYEAR does what is says. If you filter your calendar table to show only 2021, the graph should display results for 2020 and 2021.

Your measure name indicates you want a value spesifically for the year 2020? That sounds a bit like bad practice. What happens when next year comes?

Hi,

 

thank`s for your reply.
this helps me already once.
I will think about the dynamic at the turn of the year again.
Kind Regards


Hi @Till ,

 

Is this problem sloved?
If not, please let me know.

Do you want to achieve that by slicers or filters?

 

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

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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