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
Anonymous
Not applicable

YOY BASIC PLEASE

Hi all,

 

I require your support. it turns out that I have a table in a database where I must compare the difference between years. I do not have a date table because it is not really necessary because it is only a single table, therefore I must compare the growth between a specific period, it is like making a formula of YOY. my table is something like this:

 

Periodo         Rev

20190113 $   5,000
20190213 $   4,000
20190302 $   2,000
20190201 $       698
20180113 $   3,550
20180213 $   4,580
20180302 $       480
20180201 $   3,980

 

Therefore I would need to compare 20190101 vs 20180101 and so with others, 20190201 vs 20180201

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Anonymous ,

 

A date table is necessary. You can use some Time Intelligence functions like sameperiodlastyear-function-dax. Then everything will be easy.

 

currentRev = sum('table'[Rev])
lastyearRev =
CALCULATE ( SUM ( 'table'[Rev] ), SAMEPERIODLASTYEAR ( 'calendar'[Date] ) )

 

 

Best Regards,

Community Support Team _ Dale
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-jiascu-msft
Employee
Employee

Hi @Anonymous ,

 

Could you please mark the proper answers as solutions?

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi @Anonymous ,

 

A date table is necessary. You can use some Time Intelligence functions like sameperiodlastyear-function-dax. Then everything will be easy.

 

currentRev = sum('table'[Rev])
lastyearRev =
CALCULATE ( SUM ( 'table'[Rev] ), SAMEPERIODLASTYEAR ( 'calendar'[Date] ) )

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @Anonymous , why don't you creat a new column to transform in date and use acumulated function in this case?

 

Date:= DATE(LEFT("PERIODO";4);MID("PERIODO";5;2);RIGHT("PERIODO";2)

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.