Forum Discussion
Help with getting the maximum value from calculated table containing measure column
- 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.
Thie Count per Bid is below:
Hi... I still have not been able to figure it out, i can use any help you guys can get me. Thank you..M
- v-xuding-msft6 years agoCommunity Support
Hi miguelsus2000 ,
You could try to use the function of MAXX.
Measure = CALCULATE ( MAXX ( 'LoRaBlePayload (2)', [Count per BID] ), ALLEXCEPT ( 'LoRaBlePayload (2)', 'LoRaBlePayload (2)'[Content.BeaconIdentifier] ) )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.
- miguelsus20006 years agoHelper III
Hi v-xuding-msft and thank you for yoru help. However, I get a "1" for the measure column. How did you not get a "1". Could it be the format you're using?. See below (I called the above measure is called "max4"):
- miguelsus20006 years agoHelper III
Hi v-xuding-msft. Thank you for posting but I’m still getting “1” per table above.
I’ve played with the formats as well. Content.identifier is Text and Counts per BID is Whole number. How are you getting your table? What formats are you using (does it matter?). I also changed the measure name to “max4”.
I’m out of options to try, any other ideas?
max4 =
CALCULATE (
MAXX ( 'LoRaBlePayload (2)', [Count per BID] ),
ALLEXCEPT (
'LoRaBlePayload (2)',
'LoRaBlePayload (2)'[Content.BeaconIdentifier]
)
)
- miguelsus20006 years agoHelper III
Hi Xue... I moved the two measures (count per bid and max4 (you provided above)) to a separate table i created to keep it clean. But i now get an aggregate instead of max (e.g. 34+4=38). I really appreciate if you can help me. I cannot reach the same result you do. Any more ideas?
Thank you so much... Miguel.
max4 =CALCULATE (MAXX( 'Key Measures', [Count per BID] ),ALLEXCEPT ('LoRaBlePayload (2)','LoRaBlePayload (2)'[Content.BeaconIdentifier]))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)))