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 have the below table and I am trying to display the count of Number for max Count. So the count for Number is 5.
Number | Count |
1 | 100 |
2 | 101 |
3 | 102 |
3 | 103 |
3 | 104 |
3 | 105 |
4 | 106 |
5 | 107 |
5 | 108 |
When I do now it gives me 9 as the max as it does not take into account that I want to Count to be max and just give 5. How can I go about it?
Solved! Go to Solution.
Hi @tomgag,
Please refer to the snapshot below.
Best Regards,
Dale
Hi @tomgag,
Could you mark the proper answer as a solution, please?
Best Regards,
Dale
Hi @tomgag,
Seem you have a very simple request here. Please try the two measure below.
Measure = MAXX ( TOPN ( 1, 'Table1', Table1[Count], DESC ), [Number] )
Measure 2 = VAR maxCount = CALCULATE ( MAX ( 'Table1'[Count] ), ALL ( Table1 ) ) RETURN CALCULATE ( MAX ( Table1[Number] ), Table1[Count] = maxCount )
Best Regards,
Dale
Hi Dale. trying to do this and can not quite master it.
I have a table
Staff / time entered on timesheet / report date / decimal time value
I made a measure to count the number of report days
No of Days = COUNT(Timesheets[Report Date])
So as I build this the number of days is = 2
With some staff members being Tardy they have only done 1 day so far. My count returns a value of 1 when filtered by day, so is working as expected. when I remove the date I get a column in my table visual which is a mixture of 1 and 2 depending on the number of entries put in. Again correct.
To calculate a shortfall I need the max number of 2 to be returned. I can then multiply that by expected hours per day and get a total which I can compare to enterered value. Make sense?
So I need a measure to calculate the max value of "no of days" which itself a measure.
When I try your measure i am getting syntax messages saying table column "No of Days" can not be found or used here.
any suggestions what I am doing wrong?
@v-jiascu-msft Thank you for your help.
What I need is the following result. Your code gives 5 to all numbers.
Number | Count |
1 | 100 |
2 | 100 |
3 | 105 |
4 | 106 |
5 | 108 |
@Anonymous & @jthomson “Speech is silver and silence is golden.”
Hi @tomgag,
Please refer to the snapshot below.
Best Regards,
Dale
So wait, what are you wanting to do? A count? A distinct count? Return the highest value?
sorry, am also confused and laughed finally 🙂
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 |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
39 |