topN calculation with legend

Hi all,

I’ve followed two separate ways in calculating the Sales % of my Top 5%, 10%, and 20% best selling items and both work well.

What would provide valuable inshights is using the Sales Category as legend in visuals showing the Sales %. I suppose this has to do with calculating measures in the proper context. Can you provide guidance on how I should set this up?

Thank you / Efthimios

Sample Report v3.pbix (18.9 MB)

Hello @Thimios,

Thank You for posting your query onto the Forum.

Well the problem is not with the measures. When you put more than one measure into the “Values” section, it actually shows them as comparison i.e. One measure compared with Another Measure (Measure 1 V/s Measure 2) and therefore it doesn’t allows the fields to be dropped into the “Legend” section since already there’s a comparison is going on.

What you can actually do is, drop the “Category” field from “Sales Item” table into the “Axis” section and show them as a comparison. Below is the screenshot provided for the reference -

Or still if you want to show the categories into the “Legends” section than change the chart type either to “Line and Stacked Column Chart” or “Line and Clustered Column Chart”. Put any one of the measure into the “Column Values” section and the remaining measures into the “Line Values” section and now you can put the “Category” field into the “Column Series” section.

Important Note:

The “Column Series” section is not the option like “Legends” section. So when we put the “Category” into it will show the bifurcation of analysis for Categories only of the measure that is being put into the “Column Values” section but will show the collective analysis for measures that are being put into the “Line Values” section. If you show bifurcative analysis for both i.e. “Column Values” and “Line Values” than drag the “Category” field into the “Shared Axis” option as well but than there will be two/repititive legends now for each of the category (It will only show the analysis of “Top 10% Items (%)” and will ignore the other one which doesn’t makes sense). Below are the screenshots provided for the reference.

So now to avoid the mutiple/repititive categories into the “Legends” you can place a shape on first half of the categories and hide them but you cannot minimize the difference/gaps between the categories which is there in the visual. Below is the screenshot provided of the final result -

So finally, this is the only alternative available to achieve the result the way you’ve been looking for. Or you can create three charts for each of the measure and have categories in it as a legend and place them one over the another and then use the “Buttons and Bookmarks” technique to change them. If you choose to follow the the later technique than below are some of the links of the videos provided below for the reference.

Lastly, also attaching the working of the PBIX file for the reference.

Hoping you find this useful. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

Sample Report v3.pbix (18.9 MB)

1 Like

Hi @Thimios, did the response provided by @Harsh help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!

Hi @Thimios, we’ve noticed that no response has been received from you since the 15th of February. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @Thimios, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.

We’ve recently launched the Enterprise DNA Forum User Experience Survey, please feel free to answer it and give your insights on how we can further improve the Support forum. Thanks!