cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shaglok
Frequent Visitor

How to make a chart with top-selling articles

Hello.

 

I need to make a chart like this:

 

consultabi.png

 

It's a chart with the top-selling product (of a list of 50) according to the date (day, week) and hour. I already have all the data correctly formatted, but I can't find a proper way to achieve it. 

 

Thanks!!

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @Shaglok ,

 

Assuming you have the following example data, 

 

vkkfmsft_0-1660723283805.png

 

then you can use the measure to return the top ranked product.

 

Measure = 
var maxvalue = MAX('Table'[number])
return CALCULATE(MAX('Table'[Product]), FILTER('Table','Table'[number] = maxvalue))

vkkfmsft_1-1660723296492.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you!!

 

The problem is that we calculate the number using a measure, and CALCULATE does not accept it.

 

Our data structure is a bit more complex. What we register is the sell as commercial act, and each one have tags indicating the product. With the measure we count the number of the tags. Each sell ID has a tag for every product of the shop. 0 for the products we don't sell and X for the sold products.

vanessafvg
Super User
Super User

you have given  very little information here i am not sure how you want someone to solve this.

 

1. what does your data look like, provide sample data in text format

2. what are you struggling with exactly?  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.