Forum Discussion
power bi relationship
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] )- andrei_iuganu9 years agoRegular Visitor
i have made some adjustments to your dax formula
Table = ADDCOLUMNS ( FILTER ( SUMMARIZE ( startstock, startstock[Start code_item], "start stock", SUM ( startstock[Start stock] ), "end stock", SUMX ( FILTER ( endstock, endstock[End code_item] = startstock[Start code_item] ), endstock[End stock] ) ), NOT ( ISBLANK ( [end stock] ) ) ), "quantity consumed", [start stock] - [end stock] ) and it work.
but how to summarize depends on month for each product?....and next code item to show name product?
- v-chuncz-msft9 years ago
Community Support
Learn more DAX basics before moving forward. To get an exact solution, share us a more complete example.