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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

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
Icey
Community Support
Community Support

Hi @Anonymous ,

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

13 REPLIES 13
Icey
Community Support
Community Support

Hi @Anonymous ,

Just like what @Anonymous  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

Anonymous
Not applicable

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.JPGwhen i use the data directly instead of formulawhen i use the data directly instead of formula

Icey
Community Support
Community Support

Hi @Anonymous ,

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.

Anonymous
Not applicable

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.JPGTable is independentTable is independent

Icey
Community Support
Community Support

Hi @Anonymous ,

You can share your PBIX file without privacy information by OneDrive for Business. And attach the link.

 

Best Regards,

Icey

Anonymous
Not applicable
Anonymous
Not applicable

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

Icey
Community Support
Community Support

Hi @Anonymous ,

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.

 

Anonymous
Not applicable

@Icey  If i use multiple selection data is not showing. how can i select 1or more filter at a time.115.JPG

Icey
Community Support
Community Support

Hi @Anonymous ,

Add 'Table'[column] to Legend.

slicer22.PNG

 

Best Regards,
Icey

 

 

Is there a chance to get the pbix file containing the solution?

I'm trying to reproduce this but it doesn't work for me.

Anonymous
Not applicable

@Icey  Thanks a lot.

Anonymous
Not applicable

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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