Forum Discussion
Getting the highest average per month
- 8 years ago
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.
Create a calculated column using the fomrula.highest DFFAM = CALCULATE(MAX('Table'[Average]),ALLEXCEPT('Table','Table'[month]))
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
You can create a table visual to display the result as follows.
Best Regards,
Angelia
Hi,
Share the link from where we can download your workbook. Also, show the expected result.
Hi,
Sorry, i cannot give the access to my workbook.
But what i would like is to get the highest DFFAM average per month per registry (here is a sample below).
| Registry | month | DFFFAM |
| 311 | January | 0.1 |
| 311 | January | 0.3 |
| 311 | January | 0.4 |
| 312 | January | 0.1 |
| 312 | January | 0.2 |
| 312 | January | 0.2 |
| 313 | January | 0.5 |
| 313 | January | 0.4 |
| 313 | January | 0.3 |
| 311 | February | 1.1 |
| 311 | February | 1.1 |
| 311 | February | 1.2 |
| 312 | February | 1.3 |
| 312 | February | 1.4 |
| 312 | February | 1.5 |
| 313 | February | 0.3 |
| 313 | February | 0.5 |
| 313 | February | 0.8 |
| 311 | March | 0.9 |
| 311 | March | 1.1 |
| 311 | March | 0.5 |
| 312 | March | 0.1 |
| 312 | March | 1.2 |
| 312 | March | 1.3 |
| 313 | March | 1.7 |
| 313 | March | 0.3 |
| 313 | March | 0.5 |
Also, in the dashboard, an indicator as shown below:
| Month | Registry | Highest average |
Hope you can help me with this.
Thank you
- Ashish_Mathur8 years agoSuper User
Hi,
I am still not clear of what you want, but here is the DAX formula i wrote for computing Maximum DFFAM
= MAX([DFFFAM])
Here's the result i got
- rendalignacio8 years agoHelper I
Hi,
Actually, thats only the max... what i would want is to have the highest average per registry per month..
- Ashish_Mathur8 years agoSuper User
Hi,
Replace the MAX with the AVERAGE function in the formula bar