Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I'm using DirectQuery mode and have a table like this:
Id | Product |
1 | Product 1 |
2 | Product 1 |
3 | Product 2 |
4 | Product 2 |
5 | Product 1 |
6 | Product 3 |
7 | Product 2 |
8 | Product 1 |
9 | Product 3 |
10 | Product 4 |
Using a measure I need to count the sales of the product which is sold the most. In this example the measure output should be 4.
Hope someone can help.
Thanks in advance.
Solved! Go to Solution.
@jppv20 , Try a measure like
Top 1= calculate(max(Table[Product]),TOPN(1,allselected(table[product]),calculate(count(Table[Id])),DESC), values(table[product]))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
9 |