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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Issue with Slicer while combining two columns

Hello all,

I am new to PowerBI and am trying to create a view in PowerBI with the help of slicer.

 

I have a table which has 3 columns namely Title, Primary Author, Secondary Author. I am trying to create a slicer which will list all the  distinct names from both primary author and secondary author columns and when I click/select a name, the table should list all the titles wherever the name is available as either primary author or one of the seconday authors.. 

 

For example: 

Title - Primary Author - Secondary Author

ABC - John - Dev, Daisy, Mark

DEF - Dev - Pat, John, Tony

 

If I select John in slicer, it should give me both ABC and DEF in PowerBI dashboard..

 

Can someone please help me to solve?

8 REPLIES 8
mlsx4
Memorable Member
Memorable Member

Hi @Anonymous 

 

Don't know if you need the word "Dev", but anyway, what you have to do is to use Power Query here.

mlsx4_0-1689920957456.png

This is your original table. So I'm going to split both column by delimiter. First I select Primary author and use "-" as delimiter.

mlsx4_1-1689921084894.png

mlsx4_2-1689921156695.png

 

I have selected the most left one, but because you only have one. If you have several "-" choose each time of appearance. (I will assume you need Dev, if not, filter later on) 

Do the same step for Secondary Author but choose "," as delimiter.

mlsx4_3-1689921248672.png

You will get something like this.

 

And finally, unpivot columns (you select the columns with names of authors and go to Transform-> Unpivot:

mlsx4_4-1689921311559.png

And here it is:

 

mlsx4_5-1689921366306.png

If you don't need Dev you can filter at this point:

mlsx4_6-1689921417455.png

 

 

And now, you only need to put a slicer

Anonymous
Not applicable

Many Thanks for your guidance!!

 

I am facing an issue with the last step. When I try to select the columns and unpivot selected columns, it's creating two columns namely "Attribute" and "Values" and "Error" is filled in all the rows.. 

I tried to unpivot by selecting a)only the primary and secondary authors columns b) selecting title and authors columns. both are not working. 

 

could you please shed some light on what am I missing?

Ok @Anonymous . I got "Attribute" column too but I removed it (I forgot to mention this last step, sorry about that)

Have you checked that all the values are text? To unpivot just select option a), never the title

I assume you have reached this point without error, isn't it?

mlsx4_0-1689923384921.png

 

Anonymous
Not applicable

No luck!! 😞 Will it not work if there are rows with "null" values?? 

I am able to split the columns based on delimiter but unable to unpivot and get the desired output...

Can you share an example of how is your data before unpivot? Paste here some table with the values you have please. (change names by "AAA" or something like this to keep your data confidential). Because it is weird. Null values doesn't affect in this case

Anonymous
Not applicable

@mlsx4  please find below the image before unpivot for your reference....

rakeshsuresh_0-1689948367983.png

 

Hi @Anonymous 
And at this point, if you select the four columns and click on unpivot it gives you error for all rows?

Anonymous
Not applicable

@mlsx4  - Sorry for the delayed response. 
But yeah, am getting error if I select those 4 columns and unpivot it.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.