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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
faustusxanthis
Frequent Visitor

Need help calculating sum...

Hello! I am very new to PowerBI. I apologize if I can't properly search nor phrase my question correctly. 

 

So currently, I have a table that looks like this: 

 

Case NumberReject Reason 1Reject Reason 2Reject Reason 3Reject Reason 4Reject Reason 5Reject Reason 6Reject Reason 7Reject Reason 8Reject Reason 9
Case1101101011
Case2110011011
Case3111100000

 

So we track the data by which reject reason is applicable per case. And it's only presented by 0 and 1. 

 

Now, I wanted to make another table that summarizes the number of reject reasons like this: 

Reject ReasonTotal Number
Reject Reason 1x
Reject Reason 2x
Reject Reason 3x
Reject Reason 4x
Reject Reason 5x
Reject Reason 6x
Reject Reason 7x
Reject Reason 8x

 

I was wondering if there is any function or formula that would automatically lookup the text from the 1st column (the reject reason) to the 1st table and then summarize or calculate the number so that it would look like this: 

Reject ReasonTotal Number
Reject Reason 13
Reject Reason 22
Reject Reason 32
Reject Reason 42
Reject Reason 51
Reject Reason 62
Reject Reason 70
Reject Reason 82
Reject Reason 92

 

Thank you in advance!

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@faustusxanthis ,

The process you are looking to do is "Unpivot".  This is easiest done using Power Query.

Click on Transform Data, then select Transform. 

Select your Reason Code Columns, then select Unpivot - Selected Columns.

rsbin_1-1665505327613.png

Then you can create all of your Visuals using this table.

Hope you can get this to work for you.

Regards,

 

View solution in original post

2 REPLIES 2
rsbin
Super User
Super User

@faustusxanthis ,

The process you are looking to do is "Unpivot".  This is easiest done using Power Query.

Click on Transform Data, then select Transform. 

Select your Reason Code Columns, then select Unpivot - Selected Columns.

rsbin_1-1665505327613.png

Then you can create all of your Visuals using this table.

Hope you can get this to work for you.

Regards,

 

Thank you! This is exactly what I was looking for!

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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