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 725 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,520 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,770 points
4,570 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
1,651 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
• 33,030 points
2,686 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
718 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,350 points
1,065 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,350 points
905 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,350 points
1,258 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,520 points
1,447 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 9, 2019 in Power BI by Avantika
• 1,520 points

edited Mar 9, 2019 by Avantika 5,210 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP