Forum Discussion
Need help with functions / parameters
I see you are combining two tables in your M script and my understanding is that you want to filter these combined tables by date. It's a two step process, you will need create Start and End data parameters then reference your parameters in Power Query against your data column.
you can follow the link below on how parameter are created.
https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/
REF: "I have data recording in Azure Data lake where for each day I have separate table." - That's pretty unusual architecture with individual table for each date - that must be tough to manage. Do you mind if I ask why are you guys doing this?
N-
Thanks for reply!
Actually I'm combining more than 2 tables...
Currently data structure is 1 day => one folder with one table in it.
Data is stored in Azure datalake and this data structure was chosen in order to have flexibility with quering different periods of time.
I can query for a single day(1 table), for 1 month(28-31 tables), of for a year... long periods require very long query text in advanced query editor.
Way of quering is not elegant, but I have not found a way how to query for specific period in datalake.
Therefore I thought there could be an option to use parameters with functin and make automatic query for required period(tables).
If you know how to make query for a specific period(raws) in datalake, I could rebuild data and use only 1 table and then query for specific rows(starting date, ened date)
BR
Pavel
- nickchobotar8 years agoSkilled Sharer
Have you thought about introducing a DATE table https://www.agilebi.com.au/blog/power-bi-date-dimension (related to your source tables model) ? You could do that and then use a slicer (with data field) in Power BI report view to return customer periods data. There is not need to build this logic in Power Query.
N-