Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
tomgag
Resolver I
Resolver I

Card to display count of 'Number' with max value of 'Count'

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.

NumberCount
1100
2101
3102
3103
3104
3105
4106
5107
5108

 

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?

1 ACCEPTED SOLUTION

Hi @tomgag,

 

Please refer to the snapshot below.

Card_to_display_count_of_Number_with_max_value_of_Count_2

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-jiascu-msft
Employee
Employee

Hi @tomgag,

 

Could you mark the proper answer as a solution, please? 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

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 )

Card_to_display_count_of_Number_with_max_value_of_Count

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
1100
2100
3105
4106
5108

 

@Anonymous & @jthomson “Speech is silver and silence is golden.”

Hi @tomgag,

 

Please refer to the snapshot below.

Card_to_display_count_of_Number_with_max_value_of_Count_2

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jthomson
Solution Sage
Solution Sage

So wait, what are you wanting to do? A count? A distinct count? Return the highest value?

Anonymous
Not applicable

sorry, am also confused and laughed finally 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.