Forum Discussion

949184_soy's avatar
949184_soy
Frequent Visitor
2 years ago
Solved

Unpivot column using DAX shows error "Column name already exist"

Hi everyone I am trying to unpivot this columns using DAX, the name is TABLE     Into this:     Using this code:      TablaAuxiliar = UNION( GENERATE( FILTER(TABLA,...
  • audreygerred's avatar
    2 years ago

    You can create what you need in Power Query. I would remove the _02 columns as a step in Power Query, then rename the _01 columns to just be NAME, COMPANY, DEPARTMENT, and ROLE. Next, duplicate that query and remove your rename and removed column steps, then remove the _01 columns and rename the _02 columns to NAME, COMPANY, DEPARTMENT, and ROLE. Next, append the two queries together wither as a new query or within one of the two that are there.

     

  • audreygerred's avatar
    audreygerred
    2 years ago

    Transformations like this should be pushed as far upstream as possible. If it is not possible to have the source be the way you need it, the next best place is Power Query. Doing it via DAX (if even possible) would not be the best approach. Hope this helps!