Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
103 | |
75 | |
43 | |
38 | |
31 |
User | Count |
---|---|
166 | |
90 | |
65 | |
46 | |
43 |