Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

Calculate consecutive Numbers (Maximum Positive and Negative Streak) in Power BI

Hello, I have a question, if it is possible to calculate in power BI, in this case I have a column with positive and negative numbers, I want to get the maximum positive and negative streak.

In Excel this is the formula to get the positive streak, but I do not know how to pass it for power bi

2 Replies

  • Try adding these measures

    minvalue = MIN(youtablename[yourvalue])

    maxvalue = MAX(youtablename[yourvalue])

     

    then add a 2 cards to a blank report canvas 

    and set the values to minvalue and maxvalue

     

    If this does not answer your question then

    we want to help you but your description is too vaugue. Please write it again clearly.


    Please DON'T copy & paste your Excel . DAX logicn that does not work and expect us to fathom what you want to do. That is a bit crazy. 😀

    Please just give a simple non technical functional decscription of what you want, then let us suggest the DAX. Thank you.

    Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.
    Also provide the example desired output, with a clear description of the process flow.

    Remember not to share private data ... we don't want you to get into trouble. 😧

    Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.

    You will get a quick response if you put time, care and effort into writing clear problem descriptions.

    Vaugue descriptions can waste your time and ourtime.

    Look foward to helping you when the above information is forthcoming