Forum Discussion
andrei_iuganu
9 years agoRegular Visitor
power bi relationship
Hi all. I'm totally a beginner ... and I need a lot of help from you. I have an excel file. With the help of Power BI I would like to get the following thing: The "startstock" worksheet compares i...
v-chuncz-msft
Community Support
9 years ago
You may use DAX below to add a calculated table.
Table =
ADDCOLUMNS (
FILTER (
ADDCOLUMNS (
startstock,
"end stock", LOOKUPVALUE ( endstock[stock], endstock[code_item], startstock[code_item] )
),
NOT ( ISBLANK ( [end stock] ) )
),
"quantity consumed", startstock[stock] - [end stock]
)
andrei_iuganu
9 years agoRegular Visitor
i got this message "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."..when i try your DAX formula
- v-chuncz-msft9 years ago
Community Support
- andrei_iuganu9 years agoRegular Visitor
i follow the steps in tutorial and the result is this error "A table of multiple values was supplied where a single value was expected."
- v-chuncz-msft9 years ago
Community Support
Check if the following DAX works.
Table = ADDCOLUMNS ( FILTER ( SUMMARIZE ( startstock, startstock[code_item], "start stock", SUM ( startstock[stock] ), "end stock", SUMX ( FILTER ( endstock, endstock[code_item] = startstock[code_item] ), endstock[stock] ) ), NOT ( ISBLANK ( [end stock] ) ) ), "quantity consumed", [start stock] - [end stock] )