How do you add a new column with the calculated result?

0 votes

Hi ,

I have two data tables which are mentioned below

table A

Week    Feature_Name   Status

W18       Feat-1               Approve

W18       Feat-2               New

W18       Feat-3               Commit

W19       Feat-1               Approve

W19       Feat-2                New

W19       Feat-3               Commit     

table B

Week      Test      Status      Feature

W18       Test-1    Pass        Feat-1

W18       Test-2    Fail       Feat-1

W18       Test-3    Pass          Feat-1

W18       Test-4    Fail          Feat-2

W18        Test-5    Fail       Feat-2

W19       Test-6     Pass       Feat-3

My problem is, how do I add a new column in table A using Power BI Query?

May 27 in Power BI by Phalguni
• 930 points

edited May 28 by Omkar 13 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hi,

You can do this with the help of a DAX measure.

All the functions of DAX like sum, average are aggregations and they cannot be put in one field and they are also not suitable for columns.

However, you can use the following measure for your data mentioned above

calculate(count(Table A[Week]);

Table A[Week] = related(Table B[Week]);

A[Feature] = related(Table B[Feature]);

Table B[Status]="Pass"))

Hope This Helps!!

answered May 27 by Avantika
• 1,380 points

Related Questions In Power BI

0 votes
1 answer

How do you add a slicer from different table in Power BI?

In order to add a slicer from ...READ MORE

answered Mar 5 in Power BI by Phalguni
• 930 points
29 views
0 votes
1 answer

Calculated column with the sum of values from many columns in a row

Hi, You can create a new column by ...READ MORE

answered Mar 14 in Power BI by CHERUKURI
• 15,460 points
14 views
0 votes
0 answers

How do you create a relationship between two queries with same database?

I have some database view with several ...READ MORE

May 28 in Power BI by Phalguni
• 930 points
22 views
0 votes
1 answer

Add Column Count_of_people across two tables to get the count of people from a city.

Hi Anitha, 1. Merge both tables, using City ...READ MORE

answered Mar 22 in Power BI by CHERUKURI
• 15,460 points
14 views
0 votes
1 answer

Install Power BI Desktop

It’s a pretty simple process. All you ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 36,340 points
31 views
0 votes
1 answer

Few tips before I start creating Power BI dashboard

It’s always advisable to begin with the data ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 36,340 points
66 views
0 votes
1 answer

How do I format the KPI in Power BI

format the KPI by selecting the paint ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 36,340 points
44 views
+1 vote
1 answer
0 votes
1 answer

How do you add a new filter pane in old Power BI reports?

Hi, You can perform the following steps: 1. Open ...READ MORE

answered May 22 in Power BI by Avantika
• 1,380 points
23 views
0 votes
1 answer

How do you create a link visual in Power BI?

You can easily create a link between ...READ MORE

answered Mar 8 in Power BI by Avantika
• 1,380 points

edited Mar 9 by Avantika 43 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.