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
Zaky
Helper IV
Helper IV

Custom slicer / slicer with if conditions

Hi Everyone,

 

I need a slicer where i can use if conditions to "tell the slicer" to grouping the valued.

My problem with the data is that under the column Support Organization, I have to filter and manual changes the team name  according to their Assigned Group team everytime before I upload the data (by default it is grouping under Team 1).

 

What i expected to see is that for each team under Assigned Group, I want the formula that can count if condition for "Team West" to be grouped under Team 1, "Team Central" to be grouped under Team 2 and so on. If this can be done without i need to change it manually in raw data it would be great, or if there is other way of solution that can be suggest would be appreciated.

 

Thanks.

raw data.JPG

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @Zaky ,

 

If you want to add a column to assign Team Central to Team 2, you can use this formula.

 

New Group = 
IF(
    'Table'[Assigned Group]="TEAM CENTRAL", "TEAM 2", 'Table'[Support Organization])

 

Cus1.jpg

 

If you want to create a Assigned Group slicer and control the TEAM. For example, select Team EC, then group Team EC to TEAM 2.

You can refer the following steps.

 

1. Create a unique Assigned Group column table.

 

Team2 slicer = 
VALUES('Table'[Assigned Group])

 

cus2.jpg

 

2. Then we can create a measure.

 

Measure = 
var _select_group = SELECTEDVALUE('Team2 slicer'[Assigned Group])
return
IF(MAX('Table'[Assigned Group])=_select_group,"TEAM 2",MAX('Table'[Support Organization]))

 

The result like this,

 

cus3.jpg

 

cus4.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?

 

It will be helpful if you can show us the exact expected result based on the tables.

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

View solution in original post

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @Zaky ,

 

If you want to add a column to assign Team Central to Team 2, you can use this formula.

 

New Group = 
IF(
    'Table'[Assigned Group]="TEAM CENTRAL", "TEAM 2", 'Table'[Support Organization])

 

Cus1.jpg

 

If you want to create a Assigned Group slicer and control the TEAM. For example, select Team EC, then group Team EC to TEAM 2.

You can refer the following steps.

 

1. Create a unique Assigned Group column table.

 

Team2 slicer = 
VALUES('Table'[Assigned Group])

 

cus2.jpg

 

2. Then we can create a measure.

 

Measure = 
var _select_group = SELECTEDVALUE('Team2 slicer'[Assigned Group])
return
IF(MAX('Table'[Assigned Group])=_select_group,"TEAM 2",MAX('Table'[Support Organization]))

 

The result like this,

 

cus3.jpg

 

cus4.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?

 

It will be helpful if you can show us the exact expected result based on the tables.

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

@v-zhenbw-msft The solution provided has solved my problem as per requirement. Kudos 

Really appreciated for your help.

 

Regards, Zaky

amitchandak
Super User
Super User

@Zaky , I am not able to visualize output you need.

Can you share sample data and sample output in table format?

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.

Top Solution Authors