Forum Discussion

jochendecraene's avatar
5 years ago
Solved

Grouping and frequency

Hello

 

I have this dataset with unique cliënts that stayed in our shelter. Every night a person stays with us his of her unique number appears in the dataset. Now, I want to know how many times a person has stayed with us. That works fine, I do a distincount on the unique numbers and a count for the total (see picture). So I see how many times a numer appears. 

 

But know I want to categorise/group/bin them into to categories, f.e. >1, >5, >10 nights; so I can see how many people stayed for mor than 5 nights. I did some research and tried to use "SWTICH(TRUE))" but I get a "1" time for every id ... Can some help me? 

  • amitchandak's avatar
    amitchandak
    5 years ago

    jochendecraene , You have to create a table, you do not need this Switch. Table will have ranges like 

    0 2 0-2

    3 5 <=5

     

    Please find the attached file for the video after signature 

     

    Can you share sample data and sample output in a table format? Or a sample pbix after removing sensitive data.

5 Replies