This one isn’t as weird as some of mine I have an external BAQ where I need to pass the Company (easy enough) and a user selected date. I can use a Defined Parameter in the BAQ, this does work, but I’d prefer it not prompt like that (hoping there’s an alternative to using a parameter). I know I could use a Dynamic Query Adapter and suppress the prompt, but I’d prefer to keep it in the Dashboard as much as possible (there’s a lot of view rules that won’t translate easily to a Dynamic Query Adapter)
Does anyone have suggestions on how I can have a simple date selecter in a tracker view, then pass that date to the underlying BAQ? There’s no date returned or visible in the BAQ columns, so I can’t use a standard date filter, I need to call the external BAQ (table valued function) with the date.
So since you are using an External BAQ already, you can do a bit of a cool hack, here’s the code you’ll need
CREATE VIEW AllDates AS
WITH DateCTE AS (
SELECT CAST('1970-01-01' AS DATE) AS DateValue
UNION ALL
SELECT DATEADD(day, 1, DateValue)
FROM DateCTE
WHERE DateValue < DATEADD(day, -1, DATEFROMPARTS(YEAR(GETDATE()) + 1, 1, 1))
)
SELECT DateValue
FROM DateCTE
The All Dates concept seems quite workable (and useful!), I really only need months, so I can reduce it some by just using the first and adding months. However, I’m not sure how to get the function parameter to be subscribed: