Forum Discussion
Multiply DirectQuery row value with imported table value (DAX)
- 4 years ago
Anonymous I would think the summarize doing its job, what would be the job of related function in a "normal" setting without direct query.
Summarize is doing something like what group by is doing in SQL. Its grouping/aggregating where are many product id (facttable) to the table where is only one productId towards the right weight of that productID.
Thats also why you didnt got the right totals before. You were using the max weight of the entire table instead of the right weight of the filter context.
Applicable88 I think I found a solution! I went back to the first idea and since it was giving me a (seemingly unrelated) "SUMMARIZE" error, I just tried wrapping the 'fact' table in a SUMMARIZE function as follows:
TempMeasure = SUM('fact'[units sold]) * MAX('dim Product'[weight])
FinalMeasure = SUMX(SUMMARIZE('fact', 'fact'[product_id]), [TempMeasure])
This seems to give correct totals. Before closing the topic, do you have any idea why the additional SUMMARIZE within the SUMX would make sense?
Anonymous I would think the summarize doing its job, what would be the job of related function in a "normal" setting without direct query.
Summarize is doing something like what group by is doing in SQL. Its grouping/aggregating where are many product id (facttable) to the table where is only one productId towards the right weight of that productID.
Thats also why you didnt got the right totals before. You were using the max weight of the entire table instead of the right weight of the filter context.
- Anonymous4 years agoNot applicable
Applicable88 Thanks for your help & fast response on this, very much appreciated!