Forum Discussion

HowardCC's avatar
HowardCC
Frequent Visitor
9 years ago
Solved

Creating unique key: Ending up with duplicate values after using Groupby function

Hi there,

 

Im trying to create a unique key using the groupby function. I want to have a row count/sum of a value for every unique key. And it works good until I try to add an additional value to the key (an adress).

 

I ran a frequency tabel on row count and unique row count and I see that there are key's that occur more than once in the table. When I create a key without the adress it works just fine. I cleaned the adress column using cleaning/trim spaces, refreshed data, double checked my queries, all to no avail.

 

I've added a screenshot of the frequency table; 1st column is the key, 2nd is unique count, 3rd is the normal count.

Does anybody have experience with this?

 

  • HowardCC's avatar
    HowardCC
    9 years ago

    Hi Smoupre,

     

    Thnx for the tip.

     

    I think it was a memory problem though.

    I made a duplicate query and removed/filtered values that were unique.

    The table was empty (as it should be)

     

    Then I refreshed the whole PBI and I got a memory error during refresh (with 32GB Ram..)

    After that I shut down PBI and reopend the dashboards after which it was working correctly...

     

     

     

     

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    If you are referring to the CHRISTTIAN HUYGENS entry, I see different dates and that seems to be the unique piece that is causing the duplicate entry if I am understanding the problem correctly.

    • HowardCC's avatar
      HowardCC
      Frequent Visitor

      Hi Smoupre,

       

      Thnx for the tip.

       

      I think it was a memory problem though.

      I made a duplicate query and removed/filtered values that were unique.

      The table was empty (as it should be)

       

      Then I refreshed the whole PBI and I got a memory error during refresh (with 32GB Ram..)

      After that I shut down PBI and reopend the dashboards after which it was working correctly...

       

       

       

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Cool, glad you got it fixed. I recently had a similar kind of issue with a data model that I built, drove me bananas until I rebuilt it and then it worked perfectly.