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
datastrategy
Frequent Visitor

Calculate Category that has the most values in a group

I want to list the "location" that has the most beacon signlas for a given 5 min period (to essentially "see" which room a person is in).  when I do max, it obviously just gives me the max value in alphabetical order.  I guess if there's a tie it can go to alphabetical order....

 

trying to figure out where a person is by getting rid of some noise with these sensors.

 

Annotation 2019-07-14 140923.jpg

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi 

 

if you’d like to show the value like this below please use the measure:

Measure = CALCULATE(MAX(beacon[beacon1_locations]),FILTER(beacon,[Number of Beacon signlas]>=MAX(beacon[Number of Beacon signlas])),VALUES(beacon[Server time in 5 min]))

7.png

Best regards,

Dina Ye

Community Support Team _ Dina Ye
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

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi 

 

if you’d like to show the value like this below please use the measure:

Measure = CALCULATE(MAX(beacon[beacon1_locations]),FILTER(beacon,[Number of Beacon signlas]>=MAX(beacon[Number of Beacon signlas])),VALUES(beacon[Server time in 5 min]))

7.png

Best regards,

Dina Ye

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

Hi @datastrategy  ,

I've entered dummy data in order to replicate your scenario:


Capture.JPG

First, create a measure that will mark the max number of signals by time

Measure1 =
IF( CALCULATE( MAX( Table1[NUMBEROFSIGNALS] ) , ALLEXCEPT( Table1 , Table1[TIME] ) ) = MAX( Table1[NUMBEROFSIGNALS] ) , 1 , BLANK() )

Second, display Category when table is filtered Measure1 = 1
Measure2 = CALCULATE( MAX( Table1[CATEGORY] ) , FILTER( Table1 , [Measure1] = 1 ))

Let me know if unclear,
Cheers 
Robin

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

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.