cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Getting the highest average per month

Hi there,

 

I am a newbie with power bi and having some problems on how I can show the highest average per month per cateogry.

 

Maybe you can help on this.

 

I want to get the highest DFFAM per month per aircraft.

 

Sample data.png

18 REPLIES 18
Highlighted

Hi,

 

So Basically, in the dashboard, i want to show this.

 

So in the table, this will have the summary of which registry per month have the highest average DFFAM.

 

image.png

Highlighted

With respect to the data that you have shared, please share how did you arrive at the numbers 0.6,0.7 and 0.8.  Please share the actual numbers that you want to see in that column with respect to the data that you shared earlier.


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

Hi,

 

That is only a sample of something i want to get in power bi.

 

I cannot figure out on how i can get the Registry with the highest average per month.

Highlighted

Hi,

 

Let's divide the solution into two parts.  First is to get the monthwise highest average DFFAM (see screenshot below).  Is this result correct.  If it is, then let me know and we will then get the Registry as well.Untitled.png


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

Hi,

 

I think this is what I would want then get the registry as well corresponding to the highest DFFAM.

 

Can you please show me the DAX code for this?

 

Thank you

Highlighted

Hi @rendalignacio,

I create the sample table you posted, name it as 'Test'.

First, create a summary table by clicking "New Table" under Modeling on Home page, type the following formula.

Table = SUMMARIZE(Test,Test[month],Test[Registry],"Average",AVERAGE(Test[DFFFAM]))


You will get the table below.

1.PNG

Create a calculated column using the fomrula.

highest DFFAM = CALCULATE(MAX('Table'[Average]),ALLEXCEPT('Table','Table'[month]))

2.PNG

Finally, create another new table to get expected table.

Result = SELECTCOLUMNS(FILTER('Table','Table'[Average]='Table'[highest DFFAM]),"Month",'Table'[month],"Registry",'Table'[Registry],"Highest average",'Table'[highest DFFAM

3.png

You can create a table visual to display the result as follows.

4.PNG

Best Regards,
Angelia


View solution in original post

Highlighted

Hi,

 

Will try this later... This looks good.

 

Will update you later if it works on my end.

 

Thank you

Highlighted

Hi,

 

This is what i did.

 

Calculated field formula for computing Highest DFFAM

 

Highest DFFAM = MAXX(SUMMARIZE(Data,Data[Registry],"ABCD",average([DFFFAM])),[ABCD])

Calculated column formula for computing Average

 

=CALCULATE(AVERAGE([DFFFAM]),FILTER(Data,[Registry]=EARLIER([Registry])&&[month]=EARLIER([month])))

Calculated field formula for computing Registry for highest DFFAM

 

=LOOKUPVALUE([Registry],[Average],[Highest DFFAM])

Hope this helps.

 

Untitled.png

 


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

Hi,

 

Will try also this solution and will give a feedback regarding this.

 

Thank you very much

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors