Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

maximum value from table

Hi all,

can anyone help me, i have been trying to extract the maximum value from this table, yet i was unable to do so.

Is there any tricks or code that could help ?

Thanks

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

    You can try to update the formula of measure [maxxx] as below and check whether you can get the correct value. Please find the details in the attachment.

     

    maxxx = 
    CALCULATE (
        MAX ( 'energykwh energydata'[energydata_value] ),
        ALLSELECTED ( 'energykwh energydata' )
    )

     

    Best Regards

9 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi Anonymous ,

     

    You can create a measure with below code:-

     

    measure = Max(table[energydata_value])

     

    If you could share sample data in text formate with expected output then we can help you with more specific answer. 🙂

     

     

    Thanks,

    Samarth

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      The maximum number is pointed with blue arrow but with the code, i obtained value highlighted.

      hmm

      sabrina_az_1-1639654136543.png

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Samarth,

      I am not sure how to send the sample data in text format as im new to this but i will try to put it below.

      MonthDayTimeEnergydata_Value
      October3112.00 am8949461.19
      October3112.30 am8949206.22
      October311.00 am6732062.06
      October311.30 am6731925.04
      October312.00 am3475019.96

       

      Hope this is right.

      Thank you

      • Samarth_18's avatar
        Samarth_18
        Community Champion

        Okay in this case you can use above code and you will get output like this:-