So, this is my query , sorry would not be able to provide my data
let's imagine there is a table called sales it has 4 columns (seller , quantiy, price, total price)
now i have few sellers whose price are yet to update in SQL but i have their Quantity how much they have sold. i have created dax query for total price which is simple sumx(quantity * price).
now here is my issue when i filter the table sales by a seller whose price isn't available in SQL it shows a blank table something like this
I at least want to show the shipped quantity if there is no price for that seller.
(P.s. Show items with no data isn't providing desirable results)
CodePudding user response:
You could use the time-honored trick of adding 0 to the column/measure that is showing blank.
SellingPrice = SUM (SellingPrice) 0
CodePudding user response:
Please keep in mind that It is a table function (ADDMISSINGITEMS); so create a new table and paste the code below to see the result set.
Show_Missing_Data =
ADDMISSINGITEMS (
'FactTable'[sku],
'FactTable'[shippedQty],
SUMMARIZECOLUMNS (
'FactTable'[sku],
'FactTable'[shippedQty],
"Total Sales", CALCULATE ( SUMX ( 'FactTable', [quantity] * [price] ) )
),
'FactTable'[sku],
'FactTable'[shippedQty]
)