I need to calculate percentile/average amount for a country per department and then average from those percentiles/averages. How to do it in Power BI?Ā
In the report I would like to get such table:
Country
Department weighted Average (amount)
Department weighted Percentile (amount)
Denmark
AVERAGE(AVERAGE(Amounts for 1111DK), ⦠, AVERAGE(Amounts for 3333DK))
AVERAGE(PERCENTILE(Amounts for 1111DK), ⦠, PERCENTILE(Amounts for 3333DK))
Norway
Ā etc.
Ā etc.
The second question (I hope it is not too much…) : the departments can consist of sub-departments and I may need to calculate those measures by departments AND sub-departments.
Will be very grateful for your help!
—————————— Thank you in advance, Iryna ——————————
Greg Philps
Member
April 17, 2020 at 6:48 PM
Hi Iryna. You can use the CALCULATE and ALLEXCEPT DAX functions to get sales by department and sales by country, then DIVIDE to calculate the percentages. I’m not exactly sure of what you were looking for, but hopefully this sample will give you a few ideas. Greg
—————————— Greg Philps Power BI Consultant Ottawa ON Canada —————————— ——————————————-
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!