cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

difference in average revenue between different periods of the same holiday

I don't know how to calculate the 2 columns in red. Since it is not possible to use date dimensions, which dax structure should I use to calculate the percentage difference between these values ​​for the same holiday period that occur at different times of the year?

 

HolidaAverage RevenueLast Average RevenueDiff %

2018

100  
   30/03150  
   31/0350  
201920010050%
   10/04300150 
   11/0410050 
2020150200-33%
   27/04200300 
   28/04100100 

 

Help me plz. THX!

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: difference in average revenue between different periods of the same holiday

Very difficult to be specific with the information provided. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

That being said, See if my Time Intelligence the Hard Way provides a way of accomplishing what you are going for.

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


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

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Regular Visitor

Re: difference in average revenue between different periods of the same holiday

Original Table:

 

DateHolidayRevenue
01/03/2018 100
02/03/2018finados50
03/03/2018finados80
04/03/2018finados70
05/03/2018 90
06/03/2018 60
.........
27/04/2019finados150
28/04/2019finados200
29/04/2019finados40
30/04/2019 30

 

I have a table with dates from 2017 to 2021 and a column with the revenue per day. I have another column with the holidays, which normally last 3 days, however from year to year there are same holidays that fall on different days. I made an averagex to calculate the average revenue per holiday. Now I would like to calculate a percentage difference measure of the average revenue per holiday period over the years, as in the table in the original question. 

 

I want to assemble on the power bi a segmenter with the name of the holidays and a matrix with the years, the average revenue considering only the selected holidays and the percentage difference compared to the previous holiday (which probably does not fall in the same period of the previous year) .

 

Segmenter:

Feriados
Natal
Ano Novo
Finados (Selected)

 

Matrix:

YearAvarege RevenueDiff %
2017100 
201820050%
2019150-33%

 

is very similar to calculating the percentage difference from the previous year, however the days compared are different from year to year, what we have in common is the holiday column

 

Help plz =D

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021