Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
Solved! Go to Solution.
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
try this:
in a table visual; drag in your 3 key fields: Registry, MonthDate, DFFAM .... and then choose the DFFAM value to be MAX
although there is a little discrepancy in your post as you whether you want the highest or the highest average....both are stated..... so this maybe is not what you seek....
What i would actually want would be the highest average.
Then maybe show the registry with the highest average per month.
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
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
Hi,
Actually, thats only the max... what i would want is to have the highest average per registry per month..
Hi,
If this is still not your expected result, then please share a screenshot of your expected result.
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.
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.
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.
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.
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
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.
Hi,
Will try also this solution and will give a feedback regarding this.
Thank you very much
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,
Will try this later... This looks good.
Will update you later if it works on my end.
Thank you
Hi,
Replace the MAX with the AVERAGE function in the formula bar
Hi,
Doing so would only get the average for all registry.
The goal is to have an average per registry per month....
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |