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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to show frequency of combination of numbers within a group?

Hello,

 

I was trying to add these code but the output number is repeated. How to remove the repeating number?

For example 18 18 18 18 -> 18, 13 13 18 18 -> 13 18, 13 18 18 21 21 -> 13 18 21.

 

Thank you.

 

Column = CONCATENATEX(FILTER(ALL('Sheet1'),[pick_wave_id]=EARLIER('Sheet1'[pick_wave_id])),[sku_brand]," ")
Measure2 = 
COUNTROWS (
    FILTER (
        VALUES ( 'Sheet1'[pick_wave_id] ),
        CALCULATE ( COUNT ( 'Sheet1'[Column]) >= DISTINCTCOUNT ('Sheet1'[Column]) )
    )
)

 

tatgor_0-1659430454138.png

tatgor_1-1659433169550.png

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I have created a simple sample, please refer to it to see if it helps you.

Create a custom column in Power Query.

=Text.Combine (
                List.Distinct(
                          List.Transform (Text.Split([column]," "),each Text.Trim(_))
                                  )
                     ," ")

 

vpollymsft_2-1659681631528.png

 

vpollymsft_1-1659681586949.png

 

If I have misunderstood your menaing, please provide your pbix file without privacy information and desired output with more details.

 

Best Regards
Community Support Team _ Polly

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

I have created a simple sample, please refer to it to see if it helps you.

Create a custom column in Power Query.

=Text.Combine (
                List.Distinct(
                          List.Transform (Text.Split([column]," "),each Text.Trim(_))
                                  )
                     ," ")

 

vpollymsft_2-1659681631528.png

 

vpollymsft_1-1659681586949.png

 

If I have misunderstood your menaing, please provide your pbix file without privacy information and desired output with more details.

 

Best Regards
Community Support Team _ Polly

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

amitchandak
Super User
Super User

@Anonymous , Power Query new column

 

Text.Combine(List.Distinct(Text.Split([Column])), " ")

 

refer in case you need sorted too

Created distinct sorted comma-separated text from unsorted text: https://youtu.be/4bV30FEFjEM

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi@amitchandak 

 

An error occured when I added the code. Could you help me? Thank you.

 

tatgor_0-1659434367789.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors