Forum Discussion
Display Sum per Row
To display the sum of remaining hours per row in Power BI, you can use the following DAX formula for your calculated column in Tb2:
REMAINING_HRS =
CALCULATE(
SUM(Tb1[Remaining hours]),
FILTER(
ALL(Tb1),
Tb1[Sub-Task Phase] IN { "SN-10 Punchlist", "SN-11 Punchlist", "CBD-06", "PRE CPRA_WJ43", "CP-276", "CBD-09", "FL-06", "FL-09", "SN-05 Punchlist", "SN-08 Punchlist", "PRE CPRA_DP31", "SN-03 Punchlist", "SN-07 Punchlist", "2nd PRE CPRA", "02 CW-AY PRE DRILL FL"}
&& Tb1[Main Cat.] = "Q"
),
Tb1[Date] = EARLIER(Tb2[Date])
)This formula sums the Remaining hours from Tb1 for each corresponding Date in Tb2. It filters Tb1 to include only the rows where Sub-Task Phase matches any of the specified values and Main Cat. is “Q”. The EARLIER function is used to refer to the Date column of the current row in Tb2 within the CALCULATE function.
Please ensure that there is a relationship between Tb1 and Tb2 based on the Date column for this formula to work correctly. If there are any further details or specific requirements, feel free to provide them for more tailored assistance.
Hi, AnalyticsWizard
Thank you for the reply, but when I try the formula you provided it sum the overall remaining of all sub task phase and display the value on specific date. pls refer below for the output.
Thank you