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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Nanakwame
Helper II
Helper II

How to get roles/departments assigned from column values

Hi All,

 

I am very new to power bi. I a table with department names as columns. I am trying to make those department names as filters within my dashboard. Any ideas how i can transfrom that to generate a filter?

 

Thank you 

1 ACCEPTED SOLUTION
samdthompson
Memorable Member
Memorable Member

Hello, this is best attacked in PowerQuery. you will need to unpivot the columns. This will get create a list of the departments which you can use as a filter. Not sure of what the data looks like but you may need to do a few more transformations. Heres a link on unpivoting in power query: Unpivot columns (Power Query) (microsoft.com)

 

 

 

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

4 REPLIES 4
samdthompson
Memorable Member
Memorable Member

Hello, this is probably a good first step to watch to get a handle on how to make your first report:

 

Power BI Tutorial From Beginner to Pro Desktop to Dashboard in 60 Minutes - YouTube

// if this is a solution please mark as such. Kudos always appreciated.
samdthompson
Memorable Member
Memorable Member

Hello, this is best attacked in PowerQuery. you will need to unpivot the columns. This will get create a list of the departments which you can use as a filter. Not sure of what the data looks like but you may need to do a few more transformations. Heres a link on unpivoting in power query: Unpivot columns (Power Query) (microsoft.com)

 

 

 

// if this is a solution please mark as such. Kudos always appreciated.

@samdthompson 

The columns contain ID numbers and values that will be used for dax calculations. Is there a secondary table i can possible create to house the department names? Not sure how i can make that link to the main table. 

Without actually seeing how the data hangs together, DAX would use those column names better if they were on rows. You might have a table, for example with:

 
Month, Department, Amount, ID 

Your DAX would then be comething like SUM(Table1,Amount) or DISTINCTCOUNT(Table[ID]) . With a date table and a department table connected you can then start building some more complex measures with prior year calcultions etc.

// if this is a solution please mark as such. Kudos always appreciated.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.