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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Unable to slice this table by name:

I have a table that shows how many hours each worker worked on each day.  Dates in the first column.  Name of worker at top of the following columns with the hours they worked below their name.

 

When I use this table in Power BI I am able to drag the dates column to a slicer to slice the data by date.  But I'm not able to drag more than one name column so that I can divide the data by name.  It seems like an intuitive way to slice the data.  But I'm unsure what I'm doing wrong.  Any suggestions for how I could slice this data by name?

 

Reorganizing the table is not a problem.

 

 

Table That Wont Work In BI.png

1 ACCEPTED SOLUTION
JarroVGIT
Resident Rockstar
Resident Rockstar

In the query editor, select all name columns and go to transform tab, and then select unpivot selected columns. This will give you a table with three columns: date, attribute and bake, where attribute column contains the name and the value column contains the number of hours worked for that person on that date.
Now your sliver should work properly 🙂

Please mark this as the solution if this answered your question. Kudos are welcome:)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

In query editor, click all the name columns-> click the unpivot. Then you will achieve two columns [Attribute] and [Value]. Drag the [Attribute] column to the slicer.

 

Community Support Team _ Jimmy Tao

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

JarroVGIT
Resident Rockstar
Resident Rockstar

In the query editor, select all name columns and go to transform tab, and then select unpivot selected columns. This will give you a table with three columns: date, attribute and bake, where attribute column contains the name and the value column contains the number of hours worked for that person on that date.
Now your sliver should work properly 🙂

Please mark this as the solution if this answered your question. Kudos are welcome:)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

This solution worked.  Can't believe I forgot that.  Thank you very much for your help.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.