Forum Discussion
Subtotal for Min values not adding up
Hi axn1948 ,
You can create 4 measures by using the SUMMARIZE function to fix it.
max_hours = VAR _TABLE=SUMMARIZE('Matrix',[name],[description],[labor_unit],[labor_productivity],"Value",MAX('Matrix'[labor_hours]))
RETURN SUMX(_TABLE,[Value])max_total = VAR _TABLE=SUMMARIZE('Matrix',[name],[description],[labor_unit],[labor_productivity],"Value",MAX('Matrix'[labor_total]))
RETURN SUMX(_TABLE,[Value])
min_hours = VAR _TABLE=SUMMARIZE('Matrix',[name],[description],[labor_unit],[labor_productivity],"Value",MIN('Matrix'[labor_hours]))
RETURN SUMX(_TABLE,[Value])min_total = VAR _TABLE=SUMMARIZE('Matrix',[name],[description],[labor_unit],[labor_productivity],"Value",MIN('Matrix'[labor_total]))
RETURN SUMX(_TABLE,[Value])
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Stephen,
i realize I had made a mistake with the sample app. In the data model the fields are not from the same table. Labor hours, total cost, and description come from one table item. Name comes from a different table, and it isnt directly related with the item table. Productivity and unit come from a separate table as well but that is directly linked to the item table.
So whenever I try to create an expression, my table always goes into a timeout error or memory error. Whaf do I do here?