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

Average for 3 months IN MEASURE

Hello, 

 

I have create a calendar table to build relationship between my sales date and the calendar. I need an average for the past 3 month from  now( MAY)   in this case I'm needing   FEB-MAR- APR. 

HISTORICAL  SALES                              HISTORICAL SALES IN %                     AVERAGE P3M SALES IN %                  

feb-19mar-19abr-19may-19 Dayfeb-19mar-19abr-19 AVG
21089284  14%1%5% 3%
267175172  29%4%8% 7%
123186278  311%7%13% 9%
288212169  417%11%16% 13%
95171197  518%14%19% 16%
115264230  621%18%23% 21%
108287209  723%23%27% 24%
131200252  825%26%31% 28%
187298233  928%31%35% 31%
238223248  1033%35%39% 34%
200229208  1137%39%43% 37%
20297133  1240%40%45% 41%
181168123  1344%43%48% 44%
248286243  1448%48%52% 48%
236145232  1553%50%56% 52%
260292218  1658%55%60% 55%
26487113  1763%57%62% 58%
128144187  1865%59%65% 62%
177217286  1968%63%70% 66%
20024196  2072%67%71% 69%
101255112  2174%71%73% 71%
18493148  2277%72%76% 74%
29516395  2383%75%78% 77%
188212187  2486%79%81% 81%
143279190  2589%83%84% 84%
13790197  2692%85%88% 87%
26382215  2797%86%91% 90%
18327386  28100%91%93% 93%
 152292  29 93%98% 97%
 117123  30 95%100% 100%
 291   31 100%   
           
I have used this in excel and I'm trying to do tha same. That it will take the last day of each month to calculate the average, is there any way I can do that and display it in a  MATRIX in power BI  if I filter my report per month. (currently in MAY)
 
Currently Power BI automatically  generates a 100% for the "30 of february" which  obviously doesn't exist.  
 
Thanks in advance 
1 ACCEPTED SOLUTION

Hi,

See if the results here are correct.  Download the PBI file from here.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

I am not clear about which are your input tables and what exact output are you expecting?  Additionally, share the link from where i can download your Excel workbook so that i see your Excel formulas.  


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

In excel this are my formulas: 

For the historical sales in % :   =IFERROR(BZ12/SUM(BZ$12:BZ$39);"")For the historical sales in % : =IFERROR(BZ12/SUM(BZ$12:BZ$39);"")And I ask for an average of the 3 last months  sales in %And I ask for an average of the 3 last months sales in %

 

Im Trying to do pretty much the same. By the moment I have been using the following table format:

 

It has many rows of same date because of another column that is not shown in here, but it has values from 2016 to end of current month.It has many rows of same date because of another column that is not shown in here, but it has values from 2016 to end of current month.

 

 

What I need is to calculate the average of the past 3 months, but taking in consideration the last day of each month, for example for february it should have the average of de day 28, plus march 31, plus april 30,  by the moment it is shown this way: 

 

 

capture 3.PNG
And i need it tobe shown same as in the excel  because of the amount of days in each month. 

I dont know if it is possible. Or maybe another option is calculating the percentage of a day in a month  1/30, 2/30, 3/30 .... and looking for the closest value and return it as an average.



Note: data may not be according to the others due to a "RAND()" to return values as sales.



Help please!


@Ashish_Mathur wrote:

Hi,

I am not clear about which are your input tables and what exact output are you expecting?  Additionally, share the link from where i can download your Excel workbook so that i see your Excel formulas.  


 

Hi,

I can try to help if you can share the link from where i can download the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Spoiler
 

https://drive.google.com/file/d/1neda9_ucifFnelem-z7iYXfeYCYIsQwL/view?usp=sharing

 

This is an example of the data. What I'm needing is to do the same as it is in excel  with the % average for the past 3 months. Let me know if it is possible!

Hi,

See if the results here are correct.  Download the PBI file from here.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.