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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
adityah
Frequent Visitor

Summarize table by Year

Hi Guys,

 

Sorry if this question seems noobish. I have the following shaped data 

 

policy numberproduct_codelob_descriptionDateGWP
x1OMARINE1/1/202420
x2AHULL1/1/202330
x3AHULL1/1/202340
x4GDEFENSE1/1/202450
x5OMARINE1/1/202260

 

And I want to summarise and visualise this data based on product code and year like this:

lob_descriptionproduct_codeGWP_2022GWP_2023GWP_2024
MARINEO60020
HULLA0700
DEFENSEG0050

 

I have tried the pivot table visualisation but I am unable to add an extra column(lob_description) to the primary pivot column(product code) on the left side of the pivot table.

I am trying dax but am unable to create a separate column based on year. Any help is much appreciated!! Thanks!

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @adityah ,

You can achieve your desired output by using the Matrix visual. Start by expanding the row headers using the double arrow icon highlighted in green, then set the layout to 'Outline' as shown below.

 

DataNinja777_1-1724078200554.png

I have attached an example pbix file.  

Best regards,

 

View solution in original post

3 REPLIES 3
adityah
Frequent Visitor

Or do you know how to remove the gray repeating 'total' rows below:

 

adityah_0-1724080153383.png

 

DataNinja777
Super User
Super User

Hi @adityah ,

You can achieve your desired output by using the Matrix visual. Start by expanding the row headers using the double arrow icon highlighted in green, then set the layout to 'Outline' as shown below.

 

DataNinja777_1-1724078200554.png

I have attached an example pbix file.  

Best regards,

 

Thanks @DataNinja777 !!! This works but I think a DAX solution might be better since when I add a 3rd column to the left side it becomes slightly ugly

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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