cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Darmesh Regular Visitor
Regular Visitor

how to get the column name in slicer

HI,

 

How to get the column names in slicer. Filtering 1 or more column names based on the need.Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Icey New Contributor
New Contributor

Re: how to get the column name in slicer

Hi @Darmesh ,

Try this:

Measure Selection1 = 
IF (
    SELECTEDVALUE ( 'Table'[Column] ) = "SUM NET_SALES",
    [SUM NET_SALES],
    IF (
        SELECTEDVALUE ( 'Table'[Column] ) = "NET_SALES GTH (%)",
        [NET_SALES GTH (%)],
        IF (
            SELECTEDVALUE ( 'Table'[Column] ) = "SUM EBITDA",
            [SUM EBITDA],
            IF (
                SELECTEDVALUE ( 'Table'[Column] ) = "EBITDA_GTH (%)",
                [EBITDA_GTH (%)],
                BLANK ()
            )
        )
    )
)

slicer.PNG

 

Best Regards,
Icey

 

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

12 REPLIES 12
PR20048119 Member
Member

Re: how to get the column name in slicer

columns showing based on slicer selected values in currently not possible in power BI. You can pivot your dataset and acheive your result.

Icey New Contributor
New Contributor

Re: how to get the column name in slicer

Hi @Darmesh ,

Just like what @PR20048119  said, Power BI doesn't support to select columns using slicer. What's your purpose? Maybe I can provide you with other workarounds.

 

Best Regards,

Icey

Darmesh Regular Visitor
Regular Visitor

Re: how to get the column name in slicer

Hi @Icey ,

 

yes. I need to get the measure names in filter.

 

I have tried the below formula, but the data is not showing up. When i use the data directly without using formula the data is showing in chart type. Let me know the alternate method if anything available.

 

111.JPG112.JPGwhen i use the data directly instead of formula

Icey New Contributor
New Contributor

Re: how to get the column name in slicer

Hi @Darmesh ,

Try this:

Measure =
IF (
    SELECTEDVALUE ( Table[column] ) = "Net Sales (RS mn)",
    [SUM NET_SALES],
    IF (
        SELECTEDVALUE ( Table[column] ) = "Net Sales Gth(%)",
        [NET_SALES GTH (%)],
        IF (
            SELECTEDVALUE ( Table[column] ) = "EBITDA (RS mn)",
            [SUM EBITDA],
            IF (
                SELECTEDVALUE ( Table[column] ) = "EBITDA (%)",
                [EBITDA_GTH (%)],
                BLANK ()
            )
        )
    )
)

 

Keep 'Table' and 'Join BI...' independent of each other.

 

Best Regards,
Icey

 

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

Darmesh Regular Visitor
Regular Visitor

Re: how to get the column name in slicer

Still i am not able to see the data in chart or table.

 

Let me know how can i share my .pbix file. bcoz i am not able to see the attachment option.

 

113.JPG114.JPGTable is independent

Icey New Contributor
New Contributor

Re: how to get the column name in slicer

Hi @Darmesh ,

You can share your PBIX file without privacy information by Dropbox, OneDrive, Google Drive, etc. And attach the link.

 

Best Regards,

Icey

Darmesh Regular Visitor
Regular Visitor

Re: how to get the column name in slicer

Darmesh Regular Visitor
Regular Visitor

Re: how to get the column name in slicer

@Icey  . Whether the link is opening or not. so that i can share another link

Icey New Contributor
New Contributor

Re: how to get the column name in slicer

Hi @Darmesh ,

Try this:

Measure Selection1 = 
IF (
    SELECTEDVALUE ( 'Table'[Column] ) = "SUM NET_SALES",
    [SUM NET_SALES],
    IF (
        SELECTEDVALUE ( 'Table'[Column] ) = "NET_SALES GTH (%)",
        [NET_SALES GTH (%)],
        IF (
            SELECTEDVALUE ( 'Table'[Column] ) = "SUM EBITDA",
            [SUM EBITDA],
            IF (
                SELECTEDVALUE ( 'Table'[Column] ) = "EBITDA_GTH (%)",
                [EBITDA_GTH (%)],
                BLANK ()
            )
        )
    )
)

slicer.PNG

 

Best Regards,
Icey

 

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

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 55 members 969 guests
Please welcome our newest community members: