Forum Discussion

nicolasvc's avatar
nicolasvc
Icon for Helper III rankHelper III
4 years ago
Solved

Delete duplicates or pivot using dax

I have this table where I calculate the column "new" using dax, adding the offer value for each week and center, as you can see, all the rows that repeat week and center have the same value. But I would like to pivot or eliminate duplicates, the problem is that when using power query it does not show the column that I have calculated.

 

Centerweekoffernew
121-22220
121242220
322020
3222020

 

So how can I have a table like this?

 

Centerweeknew
121220
32220
  • Anonymous's avatar
    Anonymous
    4 years ago

    nicolasvc 

    Instead having complex transformation steps in power query. You could create a table using dax, this is also faster in terms of loading speed.

     

    Table 2 = SUMMARIZE('Table (2)',[Center],[week],[new])

     

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

3 Replies

  • HI nicolasvc ,

     

    I am not sure on the DAX expression that you have created.

    Is it  a column or a measure?

     

    If OFFER is a column than create it in Power Query instead of using DAX. In that way you will be able to see that in Power Query and remove duplicates.

     

    Thanks,

    Pragati

    • nicolasvc's avatar
      nicolasvc
      Icon for Helper III rankHelper III

      Is a column I calculated it doing something like this:

       

      New= CALCULATE(SUM(Table[offer]),ALLEXCEPT(Table,Table[week],Table[Center]))

       

      But I did it in DAX because I couldn't find a way to do it in power query.

  • Anonymous's avatar
    Anonymous
    Not applicable

    nicolasvc 

    Instead having complex transformation steps in power query. You could create a table using dax, this is also faster in terms of loading speed.

     

    Table 2 = SUMMARIZE('Table (2)',[Center],[week],[new])

     

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.