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
adriansuteu
Advocate I
Advocate I

Remove from graph a measure that shows change if there is no initial period to compare with

I have the current situation:

  • data for sales from 2016 and 2017.
  • a graph that show the Actual Revenue, Revenue growth from last Month and Revenue growth from the same month, previous year.

My issue is:

For the first year's (2016) Revenue = Revenue growth from the same month, previos year BECAUSE I don't have data for another previous year (2015) so it takes into consideration 0 as Revenue where it is missing data.

How can I avoid this and not show the result (Revenue growth from the same month, previos year) on the graph anymore?

 

The measures I used are:

Revenue ($) = sum(Orders[RevenuePerSale])

PY Sales ($) = [Revenue ($)](SAMEPERIODLASTYEAR('Calendar'[DateKey]))

Revenue Growth from Last Year = [Revenue ($)] - [PY Sales ($)]

 

And the graph contains both the Actual Revenue and the Revenue Growth from Last Year.

Thanks

1 ACCEPTED SOLUTION
v-caliao-msft
Employee
Employee

@adriansuteu,

 

You can use the a IF function to check it current is the minimum year. If it's the minimum year, then return current month revenue, otherwise return previous year revenue.

PY Sales ($)=if(table[year]=min(table[year]),[Revenue ($)],[Revenue ($)](SAMEPERIODLASTYEAR('Calendar'[DateKey])))

 

Regards,

Charlie Liao

 

 

 

View solution in original post

1 REPLY 1
v-caliao-msft
Employee
Employee

@adriansuteu,

 

You can use the a IF function to check it current is the minimum year. If it's the minimum year, then return current month revenue, otherwise return previous year revenue.

PY Sales ($)=if(table[year]=min(table[year]),[Revenue ($)],[Revenue ($)](SAMEPERIODLASTYEAR('Calendar'[DateKey])))

 

Regards,

Charlie Liao

 

 

 

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.