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,
I am looking to calculate some measures which count the number of accounts and show the percentage of total, which is based on filters from slicers plus the Pareto (80/20 rule) criteria. I have managed to create the Pareto chart, shown below, and the code for its measure:
On the X-axis are the individual accounts.
Based on this, I am looking to create a few cards:
I was therefore wondering, if someone would be able to help me create the required measures to create these cards based on certain conditions? As I am still quite new to Power BI I would think this should be relatively straightforward to implement, but help would be much appreciated. Counting from left to right (with numbers for example purposes only), this would entail:
1) The first card would be a total of all accounts, separate from all filters/slicers except for the selected year: my data covers account data from 2020, 2021 and 2022, so the total number of accounts differs based on the year selected (only single select allowed).
2) Second, this would be a total of the accounts based on all the selected slicer filters - this works via simply using 'Count of Account' as the field.
3) Third, the percentage of the selected accounts compared to the total of that year, i.e. point 1 divided by point 2. This would most likely be calculated by dividing the measure created in option 1 by the count of selected accounts, would the measure for point 2 then become simply as below? Would this follow a distinct count function?
Account_Count = COUNT('Data Updated'[Account])
4) This would be the option with which I am struggling the most; from the selected accounts, a certain number of accounts taken together make up c. 80% of the revenue from all selected accounts, as shown in the graph above (the purple columns). This measure would count only these accounts (i.e. with the filters applied here it would be 5 accounts). How would such a measure be created? Can this be based on data in the chart, or would this require a separate measure?
5) The percentage of point 4 divided by point 2 - I would assume this would then be the same as the calculation in point 3. This would be to show then that, in this selection, the 5 accounts that generate 80% of the revenue make up c. 20% of the total selected accounts.
Please let me know if you require any additional information! Many thanks for your help.
Solved! Go to Solution.
@Anonymous , refer if one of the two can help you to achieve the same
https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/
https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459
@Anonymous , refer if one of the two can help you to achieve the same
https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/
https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459
Hi Amit, thanks for the link - I've managed to put together the solutions based on this information!
Hi @Anonymous,
Did amitchandak's suggestions help with your scenario? if that is the case, you can consider Kudo or accept his suggestions to help others who faced similar requirements.
If that also doesn't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |