cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
datastrategy Frequent Visitor
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

Accepted Solutions
Community Support Team
Community Support Team

Re: Calculate Category that has the most values in a group

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
RobinDeFal Member
Member

Re: Calculate Category that has the most values in a group

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.
Community Support Team
Community Support Team

Re: Calculate Category that has the most values in a group

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

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 6 members 1,702 guests
Please welcome our newest community members: