Forum Discussion

Zakros's avatar
Zakros
Regular Visitor
2 years ago
Solved

Use Power Query Editor Instead dax Column = MAX and AllExcept

Hi,

 

I'm a beginner in Power BI & Power Query and I don't manage to do something in Power Query Editor.

 

In my table "Base DS-Azure" I need to create a new colmun which input the text "Max" on the rows whom the colomunt "DS-Autorization Level" contains the max value (from 0 to 5) , and this, for each data of the column "DS & Mail" (alphabetic column).

I created a new column in my Table with this code :

Max Level =
Var maxValue=
Calculate(
    MAX('Base DS-Azure'[DS-Autorization Level]),
    allexcept('Base DS-Azure','Base DS-Azure'[DS & Mail]))
    return
    If([DS-Autorization Level]=maxvalue,"MAX")
This is perfect but in fact I need this column directly in Power Query Editor.
Could you help me ?
Thanks in advance.
  • Here is my solution here 

    Table Name: My Solution

     


    If the post helps please give a thumbs up


    If it solves your issue, please accept it as the solution to help the other members find it more quickly.


    Tharun

     

6 Replies

      • tharunkumarRTK's avatar
        tharunkumarRTK
        Super User

        Here is my solution here 

        Table Name: My Solution

         


        If the post helps please give a thumbs up


        If it solves your issue, please accept it as the solution to help the other members find it more quickly.


        Tharun

         

  • Zakros's avatar
    Zakros
    Regular Visitor

    ronrsnfld 

    Thanks but it's seem a little more complicated for me.

     

    tharunkumarRTK 

    I think I understand this solution. I'll try to adapt it to my use case and I'll inform you... after our easter week end ğŸ˜‰.

    Thanks a lot.

  • Zakros's avatar
    Zakros
    Regular Visitor

    Hi tharunkumarRTK 

     

    Thanks a lot for your answer. I managed to adapt it in my use case.

    I can continue my process ğŸ™‚.