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
PhilipWebb
Frequent Visitor

Creating a column on table that contains only certain values based on another column on that table

Hi 

 

I am new to this so I may be asking a very basic question:

 

I have a tbale that has the following columns:

 

Name, Category and Value

 

In the report I am trying to create I want to have the Names as rows and the Categories as columns.

How do I do this?

 

Thanks in advance

1 ACCEPTED SOLUTION

Hi @PhilipWebb ,

 

 

1.jpg

 

 

2.JPG

 

 

Regards,
Harsh Nathani

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
harshnathani
Community Champion
Community Champion

Hi @PhilipWebb ,

 

Try using a matrix.

 

1.jpg

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Thanks Harsh

 

I tried that and I get too many columns

I think what I want is to create an extra columns that only contains one category:

For example

 

Name, Salary Category(filtered by category 1), Bonus Category (Filtered by Category 2)

 

Not sure if what I am trying to do impossible

Hi @PhilipWebb ,

 

I think you want to filter your table by categories.

 

Create a slicer.

 

1.jpg

 

 

In the fields Value you can drag the category Column.

 

You will then be able to filter your table by categories.

 

If not, pls share sample data and your expected output.

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

 

 

Data structure in SQL Table

CalendarDate Year Month EmployeeId PayrollCategoryId PayrollComponentId Category Component USDAmount
1/31/2019      2019 1         82                2                            81                               Earnings  Salary          3793.15
1/31/2019 2019 1 82 2 82 Earnings Commission 3741.00
1/31/2019 2019 1 82 2 86 Earnings TaxablePay 7534.15
1/31/2019 2019 1 82 5 95 Employer Liabilities ErNI 917.22
1/31/2019 2019 1 82 5 96 Employer Liabilities PenEr 84.97

 

And the resulting table in Power Bi

EmployeeId Salary    Commission Taxable Pay
82                3793.15 3741.00         7534.15

Hi @PhilipWebb ,

 

 

1.jpg

 

 

2.JPG

 

 

Regards,
Harsh Nathani

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

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.

Top Solution Authors