Forum Discussion
Want ActualMins Based on Task And Subtask
Hello All
I am facing an issue while getting Actualmins.
for example. I have two tables 'Table A' and 'Table B' . Both Table have Two columns "TaskNo" and "SubTaskNo"
here "Table B" have one more column "ActualMins" .
So I need a dax.... to calculate actual mins by comparing "TaskNo" from both the table... and if TaskNo = 0 then it should give Actualmins by comparing "SubTaskNo" from both the table.
Thanks In Advance.
Hi, jay_patel
Try to create a measure like below:
_ActualMins_measure = VAR _A_taskNo = MAX ( 'TableA'[A_TaskNo] ) VAR _A_SubTaskNo = MAX ( 'TableA'[A_SubTaskNo] ) VAR _B_taskNo = MAX ( 'TableB'[B_TaskNo] ) VAR _B_SubTaskNo = MAX ( 'TableB'[B_SubTaskNo] ) RETURN IF ( _A_taskNo = 0 && _B_taskNo = 0, _A_SubTaskNo - _B_SubTaskNo, _A_taskNo - _B_taskNo )Result:
Please refer to the attachment below for details
Is this the result you want? Hope this is useful to you
Please feel free to let me know If you have further questions
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
jay_patel , You can get Minute in Table1
Min in A = sumx(filter(Table2, ( Table1[TaskNo] = Table2[TaskNo] && Table1[TaskNo] <>0) || (Table1[TaskNo] =0 && Table1[SubTaskNo] = Table2[SubTaskNo] )),[ActualMins] )
- v-angzheng-msft
Community Support
Hi, jay_patel
Try to create a measure like below:
_ActualMins_measure = VAR _A_taskNo = MAX ( 'TableA'[A_TaskNo] ) VAR _A_SubTaskNo = MAX ( 'TableA'[A_SubTaskNo] ) VAR _B_taskNo = MAX ( 'TableB'[B_TaskNo] ) VAR _B_SubTaskNo = MAX ( 'TableB'[B_SubTaskNo] ) RETURN IF ( _A_taskNo = 0 && _B_taskNo = 0, _A_SubTaskNo - _B_SubTaskNo, _A_taskNo - _B_taskNo )Result:
Please refer to the attachment below for details
Is this the result you want? Hope this is useful to you
Please feel free to let me know If you have further questions
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.