Forum Discussion
abaken
3 years agoRegular Visitor
How to a filter A Select command
Hi I have the following code in a Powerbi query. How do I change it to select a date range ? Thank YOu Allister let Source = GetConsolidatedSQLData("Select accountcode, branchcode, dep...
abaken
3 years agoRegular Visitor
Hi
The code for GetConsolidatedSQLData is below.
I want to leave this code alone if I can as it is used by several queries some of which do not require a date range filter.
How Can I do this ?
Thank You
Allister
let
Source = (sqlstmt as text) => let
AccData1= GetSQLData(sqlstmt,"NLD"),
AccData1c = Table.AddColumn(AccredoData1,"CompanyCode", each "NLD"),
AccData2= GetSQLData(sqlstmt,"AKL"),
AccData2c = Table.AddColumn(AccredoData2,"CompanyCode", each "AKL"),
AccData = Table.Combine({
AccData1c
,AccData2c
})
in
AccredoData
in
Source