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
luvagoldenk9
Helper II
Helper II

Multiple Fields on Record and Filtering

Hello,

 

I recently took over a dashboard where the source data has 11 individual project code fields with names A1, A2, B1, B2, B3, C1, D1, D2, E1, F1, F2 (each field exists on each record). The field values on each record are 0 or 1 representing if the person worked a particular code on a project. 

 

Right now each of these 11 project code fields are in the Filters pane.

 

The user does not like having all these 11 project code fields in the Filters pane. They requested to group all the codes into a Parent (say 'Project Code') and then be able to filter on that single field 'Project Code' where it would then open up for the user to select which of the individual fields (A1, A2, etc.) to filter on.

 

I've tried using a hierarchy but that doesn't work as each of the individual project codes are on the same level and do not fall into a hierarchy per se. A separate product code table didn't work well either as there can only be one effective key relationship.

 

I have to be missing something. Any thoughts/suggestions on how to implement this request? Thank you !!

 

 

 

2 ACCEPTED SOLUTIONS
AlexisOlson
Super User
Super User

You essentially want to unpivot your data.

 

Instead of

PersonA1B1C1
Jim101
Bob011

 

you want

PersonProjectStatus
JimA11
JimB10
JimC11
BobA10
BobB11
BobC11

 

This kind of transformation is simple in the query editor but more painful in DAX.

View solution in original post

ntaylo06
Resolver II
Resolver II

The Filter Pane isn't very customizable, so if you are looking for a different kind of interaction you will  have to make it yourself.

 

If it were me I would separate the A1, A2, etc. columns into a separate table and then unpivot them. This would allow you to list each of these columns that has a value (just by filtering out 0 values).

 

Go from this:

Project NameA1A2B1
Proj1100
Proj2011

 

to this:

Project NameCodeValue
Proj1A11
Proj1A20
Proj1B10
Proj2A10
Proj2A21
Proj2B11

 

This would allow users to filter by Code and then Value (or you could only ever show Value=1).

 

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

View solution in original post

2 REPLIES 2
ntaylo06
Resolver II
Resolver II

The Filter Pane isn't very customizable, so if you are looking for a different kind of interaction you will  have to make it yourself.

 

If it were me I would separate the A1, A2, etc. columns into a separate table and then unpivot them. This would allow you to list each of these columns that has a value (just by filtering out 0 values).

 

Go from this:

Project NameA1A2B1
Proj1100
Proj2011

 

to this:

Project NameCodeValue
Proj1A11
Proj1A20
Proj1B10
Proj2A10
Proj2A21
Proj2B11

 

This would allow users to filter by Code and then Value (or you could only ever show Value=1).

 

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

AlexisOlson
Super User
Super User

You essentially want to unpivot your data.

 

Instead of

PersonA1B1C1
Jim101
Bob011

 

you want

PersonProjectStatus
JimA11
JimB10
JimC11
BobA10
BobB11
BobC11

 

This kind of transformation is simple in the query editor but more painful in DAX.

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.