cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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

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

Really appreciated for your help.

 

Regards, Zaky

Super User IV
Super User IV

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

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors