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
admin11
Memorable Member
Memorable Member

Column field have G1 to G16 how to make it display only G2 and G3 ?

Hi All

I have a column field , which having value label gtom G1 to G16 , i like to make it only display G2 and G3 only :-

i have try below :-

GROUP_TYPE_C = IF ( 'SALES'[GROUP_TYPE] = Blank(), "No",if(SALES[GROUP_TYPE] in {"G2","G3"},'SALES'[GROUP_TYPE], "Other"))
it does not working . see below image 

admin11_0-1616983195958.png

Below is my PBI sample file :-

https://www.dropbox.com/s/pwcsidetq8in7cy/PBT_V2021_392%20TI_SI_GL%20how%20to%20recode%20GROUP_TYPE%...

 

Paul

1 ACCEPTED SOLUTION

Hi @admin11 

you question is already asnsweres as per your ask. please accept that as answer.

However, below is the DAX 

GROUP_TYPE_C = IF ( ISBLANK('Group TYPE'[GROUP_TYPE]), "0",if('Group TYPE'[GROUP_TYPE] in {"G2","G3"},"1", "0"))




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

8 REPLIES 8
PhilipTreacy
Super User
Super User

@admin11 

Hi Paul,

 

Download PBIX

 

Create the slicer then in the Filters, restrict it to show only G2 and G3.

slicfil.png

regards

Phil



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!


@PhilipTreacy 

i Have already try using the filter , but some time it work , some time not working. those not working i decide to create slicer to filter.

Paul

@admin11 

Hi Paul,

If you set the filtering as shown I can't think of any reason it shouldn't work.  You are saying in the filter only shows G2 and G3.  So it should only show G2 and G3.

Can you please link to a file where you've tried the filtering like this and it isn't working.

Thanks

Phil



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!


@PhilipTreacy 

 

I refer to like below chart  , i set at filter only display G1 till G5 and G16.   

after i using filter pan to set it , then i create a bookmark = TARGET_SBU , and it work work fine from menu page. directly go to TARGET_SBU.

 

admin11_0-1616988657156.png

 

But then when i go to menu page and go TAGET Tab , and i thru TAGET Tab go to TARGET_SBU Tab , the chart will become un-sort .

 

@selimovd  have show me how to solve this problem different table , by un-tick All visual  :-

https://community.powerbi.com/t5/Desktop/How-to-force-PBI-sort-from-hi-to-lo-for-all-3-Table-in-one-...

 

As not easy to show the actual problem with my actual PBI foc.

 

Paul Yeo

 

pranit828
Community Champion
Community Champion

Hi @admin11 

You have displayed group type from table "Group Type" which is union of "sales" and "target_".

Now you have the group_type_c from only "sales" table and sales table doeen't have "G2" or "G3" at all so not able to display these in the slicer.

 

However if you create the same column on "Group TYPE" table and display it as a slicer you will bve able to see as your requirement.

pranit828_0-1616984838010.png

PFB the file





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

@pranit828 

 

Thank you very much it work fine. 

 

Are you able to help me modify the expression , so that it will display 1 or 0 for user to select.

 

When l Click 1  G2 and G3 will be selected.

 

Paul Yeo 

Hi @admin11 

you question is already asnsweres as per your ask. please accept that as answer.

However, below is the DAX 

GROUP_TYPE_C = IF ( ISBLANK('Group TYPE'[GROUP_TYPE]), "0",if('Group TYPE'[GROUP_TYPE] in {"G2","G3"},"1", "0"))




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

@pranit828 

Thank you very much , it work fine now

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.