Forum Discussion

David111's avatar
David111
New Member
3 years ago
Solved

Same field values repeating when displayed in table

Hi 

 

This is similar to Solved: Text value is repeating - Microsoft Power BI Community, but the solution there does not work for me.

I have a section name field that serves as a header for a table, but a couple of the fields are repeating and I cannot understand why. 

I assumed the text was slightly different for the section name records, but I have run an update statement at the source to ensure that this is not the case. I am new to PowerBI and did not create the report - I am just trying to remove these duplicate columns.

This is the source table (not all fields, but I dont think the others are relevant), and the table displays in PowerBI are below, as can be seen ShortName displays unique values as expected, whilst for SectionName, "Self Guided Learning" and "Additional hours.." are repeated. Another interesting thing is that when clicking the header to sort display order, the order is incorrect for the SectionName field as well.

Source Data:

SectionIdSectionNameShortName
1Professional Development PlanPDP
2Peer ReviewPR
3Practice ImprovementPI
4Self Guided LearningSGL
5Additional hours from PR, PI & SGLNULL
6Professional Development PlanPDP
7Peer ReviewPR
8Practice ImprovementPI
9Self Guided LearningSGL
10Additional hours from PR, PI & SGLNULL
11Professional Development PlanPDP
12Peer ReviewPR
13Practice ImprovementPI
14Self Guided LearningSGL
15Additional hours from PR, PI & SGLNULL
16Professional Development PlanPDP
17Peer ReviewPR
18Practice ImprovementPI
19Self Guided LearningSGL
20Additional hours from PR, PI & SGLNULL
21Professional Development PlanPDP
22Peer ReviewPR
23Practice ImprovementPI
24Self Guided LearningSGL
25Additional hours from PR, PI & SGLNULL
26Professional Development PlanPDP
27Peer ReviewPR
28Practice ImprovementPI
29Self Guided LearningSGL
30Additional hours from PR, PI & SGLNULL
31Professional Development PlanPDP
32Formal Peer ReviewPR
33Practice Improvement/Measuring OutcomesPI
34Combined Section 2 & 3PRPI
35Self Guided LearningSGL
36Additional hours from PR, PI & SGLNULL

 

This is how Section Name displays:

This is how ShortName displays

Any ideas/suggestions would be greatly appreciated, the column is not used for sorting or as a key.

 

Regards

David

  • David111 , You have to create sort column

    You might need two column

    Section Name 1 =  [Section Name]

     

    Section Name order =  < Order by logic using [Section Name]>

     

    Now sort Section Name 1 on Section Name order and use that in visual

     

    How to Create Sort Column and Solve Related Errors:
    https://www.youtube.com/watch?v=KK1zu4MBb-c

2 Replies

  • David111 , You have to create sort column

    You might need two column

    Section Name 1 =  [Section Name]

     

    Section Name order =  < Order by logic using [Section Name]>

     

    Now sort Section Name 1 on Section Name order and use that in visual

     

    How to Create Sort Column and Solve Related Errors:
    https://www.youtube.com/watch?v=KK1zu4MBb-c

    • David111's avatar
      David111
      New Member

      Hi Amit

       

      Thanks for the response. I think you have given me the solution although I still don't understand it. There was already a field in the source table named DisplayOrder which was being used as the sortorder. I have included it below and when looking at it I noticed the DisplayOrder values were different for a couple of the "Self Guided Learning" and "Additional hours.." records, so I updated the "Self Guided Learning" DisplayOrder value of 5 to a 4 and the duplicate "Self Guided Learning" display has disappeared.

      Thanks very much for the solution, but why did this affect SectionName and not ShortName?

       

      SectionIdSectionNameShortNameDisplayOrder
      1Professional Development PlanPDP1
      2Peer ReviewPR2
      3Practice ImprovementPI3
      4Self Guided LearningSGL4
      5Additional hours from PR, PI & SGLNULL5
      6Professional Development PlanPDP1
      7Peer ReviewPR2
      8Practice ImprovementPI3
      9Self Guided LearningSGL4
      10Additional hours from PR, PI & SGLNULL5
      11Professional Development PlanPDP1
      12Peer ReviewPR2
      13Practice ImprovementPI3
      14Self Guided LearningSGL4
      15Additional hours from PR, PI & SGLNULL5
      16Professional Development PlanPDP1
      17Peer ReviewPR2
      18Practice ImprovementPI3
      19Self Guided LearningSGL4
      20Additional hours from PR, PI & SGLNULL5
      21Professional Development PlanPDP1
      22Peer ReviewPR2
      23Practice ImprovementPI3
      24Self Guided LearningSGL4
      25Additional hours from PR, PI & SGLNULL5
      26Professional Development PlanPDP1
      27Peer ReviewPR2
      28Practice ImprovementPI3
      29Self Guided LearningSGL4
      30Additional hours from PR, PI & SGLNULL5
      31Professional Development PlanPDP1
      32Formal Peer ReviewPR2
      33Practice Improvement/Measuring OutcomesPI3
      34Combined Section 2 & 3PRPI4
      35Self Guided LearningSGL5
      36Additional hours from PR, PI & SGLNULL6

       

      Regards

      David