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, 2019 in Power BI by Phalguni
• 1,020 points

edited May 28, 2019 by Omkar 146 views

1 answer to this question.

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, 2019 by avantika
• 1,500 points

Related Questions In Power BI

0 votes
1 answer

In DAX, how do I RETURN the sum of a calculated column from a DAX Table Variable (created via ADDCOLUMN)?

You can access column variables of previously ...READ MORE

answered Oct 8, 2020 in Power BI by Gitika
• 65,870 points
807 views
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, 2019 in Power BI by Phalguni
• 1,020 points
555 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, 2019 in Power BI by Cherukuri
• 32,930 points
332 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, 2019 in Power BI by Phalguni
• 1,020 points
160 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
• 52,310 points
222 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
• 52,310 points
182 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
• 52,310 points
233 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, 2019 in Power BI by avantika
• 1,500 points
727 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, 2019 in Power BI by avantika
• 1,500 points

edited Mar 9, 2019 by avantika 491 views