I'm new to data visualisation and powerview etc. but I have the following view in 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
In powerview I can only seem to select tables to use and nothing else, is there a way to display this view possibly using DAX if so how would I go about it or is there another way to visualise this?
Ok so I found the problem, I imported the data source before I created the view but when refreshing the data in excel it was only updating the tables I chose to import. I imported again and it gave the option to include the view when you choose what tables to use.