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

How to Create a Column that Summarizes the Others

Hello,

I've got a challenging problem on my hands. I have a bunch of auditing data that we would like to track overtime by why something failed. However, the way the data is formated is with a single pass/fail column for an over all result and then multiple columns of auditing variables that also say either pass or fail. 

 

I want to be able to categorize the failures by which variable failed. 

I want to be able to create a graph showing number of failed audits over time and those broken down into failure category. 

 

So how can I create a column that essentially summarizes all the variable columns. PowerBI Question.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SydneyAM ,

Based on the description, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1728891625058.png

2.Open the power query editor, select add custom column. Enter the following formula.

if [Result] = "fail" then
         if [Ship to] = "fail" then "Ship to failed" else
         if [Qty] = "fail" then "Qty failed" else
         if [Selling Price] = "fail" then "Selling Price failed" else
         if [First Date] = "fail" then "First Date failed" else
         "Other reason"
       else
         "pass"

vjiewumsft_1-1728891637700.png

3.Select ok. The result is shown below.

vjiewumsft_2-1728891644374.png

4.Close and apply. Drag the fields to the column chart.

vjiewumsft_4-1728891725282.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @SydneyAM ,

Based on the description, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1728891625058.png

2.Open the power query editor, select add custom column. Enter the following formula.

if [Result] = "fail" then
         if [Ship to] = "fail" then "Ship to failed" else
         if [Qty] = "fail" then "Qty failed" else
         if [Selling Price] = "fail" then "Selling Price failed" else
         if [First Date] = "fail" then "First Date failed" else
         "Other reason"
       else
         "pass"

vjiewumsft_1-1728891637700.png

3.Select ok. The result is shown below.

vjiewumsft_2-1728891644374.png

4.Close and apply. Drag the fields to the column chart.

vjiewumsft_4-1728891725282.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

As part of your data preparation you unpivot the data to transform it from a wide table (like you are used to in Excel) to a narrow table (like you should be using in Power BI).  Then the summarization is very easy.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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