Forum Discussion
Dynamic Classification with two criteria
- 6 years ago
Hi az38 , Thanks for your effort. The criteria to classify towns is as follows ;
- we are applying 80/20 formula here in segments, so when we are cumulating volume contribution% then top 80% ( in descending order) data will look like this
- so segment will always be in slicer. you can see that i have sorted data in descending order to get top % volume contributed towns. now we need to classify towns as per below criteria :
- If volume contribution is till 80% and market share of "My Company" in the town is >= "My Company's Total Share" in the segment then "Stronghold"
- If volume contribution is till 80% and market share of "My Company" in the town is < "My Company's Total Share" in the segment then "Headroom"
- If volume contribution is till remaining 20% and market share of "My Company" in the town is >= "My Company's Total Share" in the segment then "Emerging"
- If volume contribution is till remaining 20% and market share of "My Company" in the town is < "My Company's Total Share" in the segment then "Small"
- its like 0% to 80% then 81% to 100% (since we have already sorted data in top to bottom). I want to approach this by using "DESC" formula so that it would always be dynamic whenever i am selecting any other segment. I have 15 million rows data hence request for dynamic measures.
- I have tried my best to explain the situation. Sorry for any bad grammer or spelling mistake.
Regards
Harish
P.S. - I tried to use your link but it not working. Also in my excel link there a sheet called "Criteria". you can also go through there.
- 6 years ago
Hi,
You may download my Excel solution workbook from here. I have written DAX measures to solve the problem. This can very easily be imported into PowerBI Desktop but before you do so, please check the results thoroughly.
Hope this helps.
- 6 years ago
Hi Ashish_Mathur , Please find revised data for better understanding;
| Town Name | Brand Name | Category | Company | Segment | Volume |
| Jaipur | ABC | Shampoo | My Company | Deluxe Shampoo | 100 |
| Jaipur | DEF | Shampoo | Company2 | Deluxe Shampoo | 50 |
| Jaipur | GHI | Shampoo | Company3 | Deluxe Shampoo | 40 |
| Jaipur | JKL | Shampoo | Company4 | Deluxe Shampoo | 120 |
| Ajmer | ABC | Shampoo | My Company | Deluxe Shampoo | 90 |
| Ajmer | DEF | Shampoo | Company2 | Deluxe Shampoo | 130 |
| Ajmer | GHI | Shampoo | Company3 | Deluxe Shampoo | 70 |
| Ajmer | JKL | Shampoo | Company4 | Deluxe Shampoo | 55 |
| Udaipur | ABC | Shampoo | My Company | Deluxe Shampoo | 77 |
| Udaipur | DEF | Shampoo | Company2 | Deluxe Shampoo | 35 |
| Udaipur | GHI | Shampoo | Company3 | Deluxe Shampoo | 120 |
| Udaipur | JKL | Shampoo | Company4 | Deluxe Shampoo | 98 |
| Jodhpur | ABC | Shampoo | My Company | Deluxe Shampoo | 80 |
| Jodhpur | DEF | Shampoo | Company2 | Deluxe Shampoo | 120 |
| Jodhpur | GHI | Shampoo | Company3 | Deluxe Shampoo | 95 |
| Jodhpur | JKL | Shampoo | Company4 | Deluxe Shampoo | 130 |
| Jaipur | MNO | Shampoo | My Company | Premium Shampoo | 60 |
| Jaipur | PQR | Shampoo | Company2 | Premium Shampoo | 45 |
| Jaipur | STU | Shampoo | Company3 | Premium Shampoo | 40 |
| Jaipur | XYZ | Shampoo | Company4 | Premium Shampoo | 90 |
| Ajmer | MNO | Shampoo | My Company | Premium Shampoo | 46 |
| Ajmer | PQR | Shampoo | Company2 | Premium Shampoo | 55 |
| Ajmer | STU | Shampoo | Company3 | Premium Shampoo | 30 |
| Ajmer | XYZ | Shampoo | Company4 | Premium Shampoo | 35 |
| Udaipur | MNO | Shampoo | My Company | Premium Shampoo | 22 |
| Udaipur | PQR | Shampoo | Company2 | Premium Shampoo | 55 |
| Udaipur | STU | Shampoo | Company3 | Premium Shampoo | 15 |
| Udaipur | XYZ | Shampoo | Company4 | Premium Shampoo | 60 |
| Jodhpur | MNO | Shampoo | My Company | Premium Shampoo | 45 |
| Jodhpur | PQR | Shampoo | Company2 | Premium Shampoo | 60 |
| Jodhpur | STU | Shampoo | Company3 | Premium Shampoo | 70 |
| Jodhpur | XYZ | Shampoo | Company4 | Premium Shampoo | 20 |
Now we need to create a measure for My Company's market share in particular segment. For example market share of ABC is now at 24.6% (which is expected to change or update). Please find link of excel file. I have tried to explain everything in the file.
Link for the file - https://chav5nz-my.sharepoint.com/:x:/g/personal/office883_chav5nz_onmicrosoft_com/EZy73DG7rFhNrNu_40JmLk8B8BPc5NlP9vd0Vbl5aDUZwA?e=pyelnl
Please do revert for any query.
Regards
Harish Rathore
Hi,
You may download my Excel solution workbook from here. I have written DAX measures to solve the problem. This can very easily be imported into PowerBI Desktop but before you do so, please check the results thoroughly.
Hope this helps.
- HarishRathore6 years agoHelper II
Hi Ashish_Mathur , Many Many Thanks... Thats what I wanted... You are my superhero.... Bravo Bravo Bravo.
Regards
Harish Rathore
- Ashish_Mathur6 years agoSuper User
You are welcome. Thank you for yoru kind words.
- HarishRathore6 years agoHelper IIHi Ashish_Mathur, I have one query. When I am removing "Town Name" from Row labels in pivot then I am not getting "Town Classification" anymore. I have 124 towns in my original data and I want to show summary of town classification. For example what is the market share in town classification, number of towns in each town class. Basically I want to use town classification in row labels. Can you please help me????
Regards
Harish Rathore