Forum Discussion
miguelsus2000
6 years agoHelper III
Help with getting the maximum value from calculated table containing measure column
Hi... i only want to display the maximum of each group for the calculated table below. For example, for 0000-1040I =32, for 1040O=32, 10413=43, etc. When i use MAX it complains the Counter per BID ...
- 6 years ago
Hi miguelsus2000 ,
Miguel, I tested your sample data. Maybe the following formula can help you. For why you get the sum value, I think it is caused that my sample is too simple. It is filtered by other columns in your actual data.
MAXX = MAXX ( SUMMARIZE ( FILTER ( ALLSELECTED ( 'LoRaBlePayload (2)' ), 'LoRaBlePayload (2)'[Content.BeaconIdentifier] IN FILTERS ( 'LoRaBlePayload (2)'[Content.BeaconIdentifier] ) ), 'LoRaBlePayload (2)'[Content.BeaconIdentifier], 'LoRaBlePayload (2)'[PartitionKey], "New", [Count per BID] ), [New] )Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Tahreem24
6 years agoSuper User
Use the below meaure to get the Max value for each group:
Measure = CALCULATE(Max(Table[Value]),ALLEXCEPT(Table,Table[Category]))
Dont forget to hit THUMBS UP and Accept this as a solution if it helps you!
- miguelsus20006 years agoHelper III
I forgot to add the table, but the Count per BID is a caluclated measure which MAX doesn't like.
max4 = CALCULATE(Max('LoRaBlePayload (2)'[Count per BID]),ALLEXCEPT('LoRaBlePayload (2)','LoRaBlePayload (2)'[Content.BeaconIdentifier]))Error: Column 'Count per BID' in table 'LoRaBlePayload (2)' cannot be found or may not be used in this expression.- Tahreem246 years agoSuper User
where does Count per BID field come from? Is it coming from same table like 'LoRaBlePayload (2)?
Dont forget to hit THUMBS UP and Accept this as a solution if it helps you!
- miguelsus20006 years agoHelper III
Thie Count per Bid is below:
Count per BID =CALCULATE(COUNTA('LoRaBlePayload (2)'[Content.BeaconIdentifier]),FILTER(ALLSELECTED('LoRaBlePayload (2)'[Content.Rssi]),ISONORAFTER('LoRaBlePayload (2)'[Content.Rssi], MAX('LoRaBlePayload (2)'[Content.Rssi]), DESC)))This tells me how many readings i've received for each partition key for each content.beaconidentifier. Now, i only want the max for each group of content.beaconidentifier,t hen show all 3 columns for that max. Eg. from the calculated table above, i want to show:Content.beaconidentifier Max Count Partitionkey0000-1040l 32 7b....580000-1040O 32 7b....580000-10413 43 7b....58if i dont need to use Count per Bid, it's ok, but needed a way to verify the maxAny ideas?