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.
Hi Team,
Need help in solving the below problem.
City Day Hrs
A 2-Jan-19 8
A 3-Jan-19 4
A 7-Jan-19 4
A 10-Jan-19 6
A 14-Jan-19 2
A 15-Jan-19 6
A 23-Jan-19 10
A 28-Jan-19 6
A 29-Jan-19 2
A 31-Jan-19 4
A 8-Jan-19 18
B 1-Jan-19 8
B 2-Jan-19 10
B 4-Jan-19 10
Out put
A 6.36
B 9.33
Result 7.845
Solved! Go to Solution.
In matrix table you will get that in grant total.
Other way is summarize and union
union (summarize(table,city,"Avg Value"average(value)),summarize(table,"city","Overall","Avg Value"average(value)))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Hi @Anonymous ,
In fact, you can simply use summarize function with rollup to create new table ith summarize result with its subtotal:
Table =
SELECTCOLUMNS (
SUMMARIZE ( NT, ROLLUP ( NT[City] ), "AVG", AVERAGE ( NT[Hrs] ) ),
"City", IF ( [City] <> BLANK (), [City], "SubTotal" ),
"AVG", [AVG]
)
Notice: rollup function will add a new row with a blank label, selectcolumns function is used to replace the blank part as 'SubTotal'.
Regards,
Xiaoxin Sheng
what is the problem . Is Average(table[hours]) not working properly ?
The problem is i want to show the average by city and then overall average.
In matrix table you will get that in grant total.
Other way is summarize and union
union (summarize(table,city,"Avg Value"average(value)),summarize(table,"city","Overall","Avg Value"average(value)))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
69 | |
69 | |
43 |
User | Count |
---|---|
146 | |
106 | |
104 | |
89 | |
65 |