The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everybody
This is my first post in this forum and I am new to Power BI.
Actually I am creating a dashboard on which I would like to show the total sum of sales in one row and the percentage in another row. So the result should look as follows:
The source data would look like that:
A secound table should show the customer count per MarketArea and look like that:
Currently I am fetching the data from the database. In the database I created a view that aggregates the data and using a union I get the sums and the percentages in two rows.
The problem is, that the drill-trough is not possible as my view does not cotain the single customer records.
How can the result be achieved in Power BI?
Thanks in advance for your help.
Regards,
Roland
Solved! Go to Solution.
@RolandBAV , Create measures
sales = Sum(Table[Sales Value])
Clients = distinctcount([client ID])
% of Sales = divide([sales], calculate([sales], removefilters(Table[Market Area])) )
% of client = divide([Clients], calculate([Clients], removefilters(Table[Market Area])) )
You can now use these measures on Matrix visual- With option - Switch values to row
Switch values to row - https://youtu.be/cN8AO3_vmlY?t=11650
Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s
Hi @RolandBAV
If you just wanted to do pivot ofyour data just take matrix visual and enable this option under value section
take your market in column section and sales and percentage in value section
I hope i answered your question!
Hi @RolandBAV
Can you please show case your power bi dataset like how your data is look alike??
just simple take table visual add all your columns into it. and share screenshot of that if possible.
bcz by looking at the source data your expected output seems quite simple but dont know about actual data ingested in power bi.
Hi @Uzi2019
Sorry, my description was not clear. This is the data I would like to process, meaning the dataset contains this data:
Regards,
Roland
Hi @RolandBAV
If you just wanted to do pivot ofyour data just take matrix visual and enable this option under value section
take your market in column section and sales and percentage in value section
I hope i answered your question!
@RolandBAV , Create measures
sales = Sum(Table[Sales Value])
Clients = distinctcount([client ID])
% of Sales = divide([sales], calculate([sales], removefilters(Table[Market Area])) )
% of client = divide([Clients], calculate([Clients], removefilters(Table[Market Area])) )
You can now use these measures on Matrix visual- With option - Switch values to row
Switch values to row - https://youtu.be/cN8AO3_vmlY?t=11650
Percent of Total and Percent of SubTotal https://www.youtube.com/watch?v=6jTildcV2ho
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s