Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
koko_pbi
Frequent Visitor

power query unpivot function

hey everyone, 

 

i have a quick question , if you can help me with that,

in my power query i face one issue/or problematic 

my data is in column structured (exemple below) i can unpivot the data for more flexibility and automation ,

but i'm asking myself if the fact that i get a lot of duplicate in some of culumns after unpivoting, will not affect my result when i aggregate through dax measures ????   (average - median - text analysis  - stdev -..... date comparison  )

for exemple i know i can't anymore count the number of rows/of responses, since i dont have ids to count the distinct one (emails are not mondatory, some felt)  (i can try to divide the count of row on the number of cols i unpivot , but perhaps it not so a good idea)

data exemple, let say i have response to a survey 

date            -   question 1       - question 2    -   question 3        -   question 4      -   email    -  company     - comment - language 

 01-01-2022     Res 1                 Res 1                    Res 1                    Res 1             1@gm.com    empty      not so good       en

01-01-2022     Res 2                 Res 2                    Res 2                    Res 2              2@gm.com    google          good       fr

01-02-2022     Res 3                 Res 3                   Res 3                    Res 3              3@gm.com   micros          null       de

 

 

-- afrer unpivot : 

date                                    attribute                      value                  email            company     comment        language               

01-01-2022                         question 1                   Res 1                1@gm.com    empty      not so good       en

01-01-2022                         question 2                   Res 1                  1@gm.com    empty      not so good       en

01-01-2022                         question 3                   Res 1               1@gm.com    empty      not so good       en

01-01-2022                         question 4                   Res 1                1@gm.com    empty      not so good       en

 

01-01-2022                         question1                  Res 2                2@gm.com    google         good       fr

01-01-2022                         question2                   Res 2                  2@gm.com    google         good       fr

01-01-2022                         question 3                  Res 2               2@gm.com    google         good       fr

01-01-2022                         question4                   Res 2                2@gm.com    google         good       fr

.........

 

then my question is, did you already face this situation , what should i take care on ??   will i have false result if i 'm not careful 

 

i will now compare the two situation with some aggregation , but i want you confirmation too, please let me know 

thank you , 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @koko_pbi ,

 

If I understand correctly, you can add an index column as an ID column first and then unpivot.

Add an index column - Power Query | Microsoft Learn

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @koko_pbi ,

 

If I understand correctly, you can add an index column as an ID column first and then unpivot.

Add an index column - Power Query | Microsoft Learn

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.