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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
prabhuk
Helper I
Helper I

Group Customer

Hello!

I have about 100 customers in my table from whcich i need to create a measure to select sepcific two customers rest of the customers grouped uder "all others". Example: Customer A and Customer B and All others. Is there any way to solve this requeirement?

 

Prabhu

1 ACCEPTED SOLUTION

hi, @prabhuk 

 

It’s my pleasure to answer for you.

According to your description,If the original ‘customer’ column doesn't appear in your table, It's recommended to use a calculated column to display.

Like this:

Column = SWITCH (
    TRUE(),
    'Table'[Customer]="AA","A",
    'Table'[Customer]="BB","B",
    "All Others"
    )

3.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @prabhuk 

If you can supply your actual data it makes things easier, but I've ceated some dummy data you can download in this PBIX file.

With a table like this

custs.png

You can create this measure

 

Measure = SWITCH (

    TRUE(),

    CONTAINSSTRING(MIN('Table'[Customer]) , "AA"), "Customer",

    CONTAINSSTRING(MIN('Table'[Customer]) , "BB"), "Customer",

    "All Others"
    
    )

 

Which gives you this

custs-type.png

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Thanks,

 

When i select measure along with sale value ,it is relfecting as customerA not as Customer A and Customer B and all others . I have attached the File for your reference. Kindly help to have measure in row  as Customer A, Custome B and All others and Sales in Value column.

https://www.dropbox.com/s/ebdltaemwfbqg9l/prabhuk.pbix?dl=0

hi, @prabhuk 

 

It’s my pleasure to answer for you.

According to your description,If the original ‘customer’ column doesn't appear in your table, It's recommended to use a calculated column to display.

Like this:

Column = SWITCH (
    TRUE(),
    'Table'[Customer]="AA","A",
    'Table'[Customer]="BB","B",
    "All Others"
    )

3.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

Anonymous
Not applicable

Create a calculated column in your table for instance CustomerGroup with the logic

IF Customer = "customer a" or Customer =  "customer b" THEN customer ELSE "Other"

 

Create a slicer on the new column

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.