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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rohitjmd
Helper II
Helper II

calculated column based on not related column in other table

hello, 

 

could you please help creating calculated column amount in non related table as per below condition,

ProjectamountYearMonth
A2020191
B3020192
C4020193
D4520192
A2120191
A3420193
A2420192
C2320193
D3420192

 

ProjectYearMonthAmount
A20191 
B20192 
C20193 
D20192 
A20192 
A20193 
1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @rohitjmd 

 

You can aggregate the amount column directly and the results would meet your requirement:

02.PNG

Also, you can calculate the amount using below DAX:

Measure = CALCULATE(SUM('Table'[amount]),VALUES('Table'[Month]),VALUES('Table'[Project]))

03.PNG

Community Support Team _ Dina Ye
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

5 REPLIES 5
v-diye-msft
Community Support
Community Support

Hi @rohitjmd 

 

You can aggregate the amount column directly and the results would meet your requirement:

02.PNG

Also, you can calculate the amount using below DAX:

Measure = CALCULATE(SUM('Table'[amount]),VALUES('Table'[Month]),VALUES('Table'[Project]))

03.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
FrankAT
Community Champion
Community Champion

Hi @rohitjmd,

try the following measure:

 

08-07-_2020_23-49-47.jpg

 

Regards FrankAT

RichardJ
Responsive Resident
Responsive Resident

Hi @rohitjmd,

 

An option to provide the grouping and aggregation you would like would be to use the 'Group By' function found within the Transform tab of the Power Query Editor.

 

You could group by the Project Name, then aggregate by sum for the month.

 

This would add your new column with the consolidated amount

 

You may wish to duplicate your original table first so you have a grouped version in addition to the original non grouped version.

 

Group ByGroup By

 

Cheers,

Richard

Well, Could you sugggest how to do it through dax?

RichardJ
Responsive Resident
Responsive Resident

Hi @rohitjmd,

I won't be able to do that as the group by method is the way I would use to create the column.

Cheers,

Richard

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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