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
rydajo96
Helper II
Helper II

YOY Growth

Hi, 

 

I have successfully managed to plot the year on year growth as shown below. However, how do I get rid of the 100% in the 2019 column under the YOY and variance?

 

rydajo96_0-1669628947287.png

Also r, if I select a particular year say 2020, it is not showing the revenue PY from 2019. Is there a way to fix this? My current fix is to select both 2019 and 2020 to show 2019 number. 

rydajo96_1-1669629220051.png

 

10 REPLIES 10
Mikelytics
Resident Rockstar
Resident Rockstar

HI @rydajo96 ,

 

Please use the following approach:

Revenue_YoY Variance =
var var_RevenueCurrentYear = [Revenue_Total]
var var_RevenuePreviousYear = [Revenue_PY]

RETURN
IF(
   ISBLANK(var_RevenuePreviousYear),
   BLANK(),
   DIVIDE(var_RevenueCurrentYear,var_RevenuePreviousYear) - 1
)

Best regards

Michael

-----------------------------------------------------

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Hi @Mikelytics it doesnt seem to return what is intended 😕

rydajo96_0-1669630101395.png

 

@rydajo96 

sorry I think it was a misunderstandin. THe measure I sent you was meant to be used as your percentage measure 🙂

 

so please do your Revenue_YoY variance mwasure as it was and then please replace the fomrula for the measure Revenue_YoY variance %

 

Revenue_YoY Variance % =
var var_RevenueCurrentYear = [Revenue_Total]
var var_RevenuePreviousYear = [Revenue_PY]

RETURN
IF(
   ISBLANK(var_RevenuePreviousYear),
   BLANK(),
   DIVIDE(var_RevenueCurrentYear,var_RevenuePreviousYear) - 1
)

 

Best regards

Michael

-----------------------------------------------------

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

@rydajo96 

Can you plese also show your PY measure so that I can help you solving the second issue?

 

Best regards

Michael

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Hi @Mikelytics thanks for the quick reply. Let me try your first solution out. In the meantime this is formula used for the PY:

Revenue_PY = CALCULATE([Revenue_Total],DATEADD('Product Pivot'[Date].[Date],-1,YEAR))

@rydajo96 

 

I think I know the reason for the secod topic. Can you please elaborate how you filter on the years? Do you use a separate table?

 

Do you have a proper date table in your data model? It would be could to see the data model (in best case screenshot) as well as a description on which tables and which columns you set the filters.

 

Best regards

Michael

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

@Mikelytics for the date table its within the same table - only one table is used. so the table included a date column as well. no external table is used. 

@rydajo96 

 

Can you please show a sample. Because iof there is only one table and a date column how do you filter on year?

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

rydajo96_0-1669630466960.png

it is something like this 

 

Please try:

Revenue_PY = 
CALCULATE([Revenue_Total],
   DATEADD('Product Pivot'[Date],-1,YEAR),
   ALL('Product Pivot'[FY])
)

If this does not work please start working with date table. It is THE most recommended practice and it makes your life so much easier on long-term.

 

Best regards

Michael

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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