我是数据可视化和 powerview 等方面的新手,但我在 SQL Server 中有以下视图:
--This view displays any delivery that was late and by how many days
CREATE VIEW [Display Late Deliveries]
AS
--Wrapped into subquery to allow the filter of virtual column NumOfDaysLate
SELECT * from (
SELECT dbo.tblPurchaseOrder.PurchaseOrderID, dbo.tblPurchaseOrder.SupplierID,
DATEADD(D, dbo.tblPurchaseOrder.LeadTimeDays, dbo.tblPurchaseOrder.DateOfOrder)
AS ExpectedDelivery, dbo.tblPurchaseInvoice.GoodsReceived,
DATEDIFF(D, ExpectedDelivery, GoodsReceived)
AS NumOfDaysLate
FROM dbo.tblPurchaseOrder LEFT OUTER JOIN
dbo.tblPurchaseInvoice ON dbo.tblPurchaseOrder.PurchaseOrderID = dbo.tblPurchaseInvoice.PurchaseOrderID
) x
WHERE x.NumOfDaysLate > 0
在powerview中,我似乎只能选择要使用的表,没有其他方法,有没有办法显示这个视图可能使用DAX,如果是这样我将如何去做,或者有另一种方式来可视化这个?