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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sharmon9000
Helper I
Helper I

Filter Weekly Totals by Company when both weekly totals are returned in 1 row

I was trying to figure out a way to filter by company when the weekly totals are returned on 1 row by week.

 

Example of returned row from database:

| WeekEnding  |   Company1   |  Company2  |
  2019-07-27       2500           3500
  2019-07-20       2200           3350
  2019-07-13       2600           3450

It was easy to combine the totals by week using a measure and SUM to combine both totals. But is it possible to have a filter where the TOTAL will be updated depending on if Company1 or Company2 or Both is selected?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@sharmon9000 - When more than one column are essentially the same data, it is best to "Unpivot" the columns. The easiest way to unpivot columns is in Power Query. Click "Edit Queries" to open the Power Query Editor, and then do the following:

1. Select Transform tab.

2. Select "WeekEnding" column.

3. Click the arrow next to"Unpivot Columns". 

4. Click "Unpivot Other Columns".

Unpivot.PNG

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@sharmon9000 - When more than one column are essentially the same data, it is best to "Unpivot" the columns. The easiest way to unpivot columns is in Power Query. Click "Edit Queries" to open the Power Query Editor, and then do the following:

1. Select Transform tab.

2. Select "WeekEnding" column.

3. Click the arrow next to"Unpivot Columns". 

4. Click "Unpivot Other Columns".

Unpivot.PNG

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.