Forum Discussion
Paginated Report - Help With Parameters
- 3 years ago
I got this figured out. I had pasted the query for the paginated report from the Power BI desktop query in the performance analyzer. That creates a completely different DAX query than if you add your model and drag and drop your columns/measures into the query designer from scratch. Once I did this, the parameters were fine. I did have to include an "ORDER BY" at the end of the query because it doesn't alphabetize them.
I'm using ODBC as a data source for a Teradata db and trying to biuld paginated reports using an existing sql from a template. Here is a sample query, unless I put in query parameters the query runs against billions of records, I looking to see a way I can put query parameters for users to input of their choice.
SELECT r.reserved_id, t1.summary_id, t2.summary_id FROM reserved r INNER JOIN (select a.summary_id, a.num from tests a where a.date = (@ StartDate) ) t1 ON t1.summary_id = r.reserved_summary_id INNER JOIN (select b.summary_id, b.claim_id from betatests b where b.claim_id = (@ Claim_id) )t2 ON t2.summary_id = r.reserved_for_summary_id
How can I use this custom sql and include query parameters ?
I believe teradata expects a "?" as the parameter. This article, while old, still applies to how queries work. https://assets.teradata.com/resourceCenter/downloads/WhitePapers/SQL%20Server%202012%20Reporting%20Services%20and%20Teradata%2001.2014.pdf