Forum Discussion
Calculate Column amount based on condition and row properties
Hi lemontree ,
Firstly, do you want to achieve your output with power query or dax?
If you only want to achieve that with power query, hope ImkeF could help.
If you also could achieve that with dax, i still a little confused about your logic and the desired output.
For your data sample, do you want to achieve the group k to be 13.6=5% * ( 210 + 62)?
If not, could you describe your logic in more details and share your desired output so that we could give other ideas?
Best Regards,
Cherry
- lemontree7 years ago
Helper I
v-piga-msft wrote:Hi lemontree ,
Firstly, do you want to achieve your output with power query or dax?
If you only want to achieve that with power query, hope ImkeF could help.
If you also could achieve that with dax, i still a little confused about your logic and the desired output.
For your data sample, do you want to achieve the group k to be 13.6=5% * ( 210 + 62)?
If not, could you describe your logic in more details and share your desired output so that we could give other ideas?
Best Regards,
Cherry
Hi v-piga-msft !
I was thinking to do that in power query but if there is an easier approach through Dax i am fine with this as well.
Based on the data sample posted the output will be per sub-item, per group and a total one:
Item 1.1 = 10x5 = 50
Item 1.2 = 12x10 =120
Item 1.3 = 10x4 = 40
Item 1 = 50 + 120 + 40 = 210
the same for Item 2 so it will sum up to 62 in total and then 1 + 2 = 272 will be multiplied by 5% to give us item 3 ie 8,16
And then item no 4 should be 3% of items 1, 2 and 3 added together ie 3% x ( 272+8,16) = 14,08
and finaly the total will be the sum of all those.
i hope now it is clear what i am trying to achieve.
thank you in advance for your support!
best,
Jim