Forum Discussion
Converting the invoked function to Static Data for consolidation
- 5 years ago
Hi Anonymous ,
it sounds to me as if you're looking for what's often called as "incremental refresh".
I've published some workarounds here: How to create a Load History or Load Log in Power Query or Power BI – The BIccountantor here: Create a load history or stage in CDS instead of incremental load in Power BI – The BIccountant
But it's all a bit hacky, as you'll see.
With regards to a function that returns a static value. This is possible, but I question the motivation for it: Why not simply reference the static value?
Anyway: To do this you create a function without a parameter like so:() => let Source = #table({"Product", "Amount"}, {{"A", 10}, {"B", 20}}) in Source
Hello Anonymous
also to me this looks like you would need an incremental refresh, and this, as ImkeF already wrote is almost not possible in Power BI. If you have a data source, that gives you historical data (but with your function you are only querying the latest data) then you could create a list of dates and then invoke your function with different dates, and therefore getting all historical data. If there is no possibilities to do that you would be better of to user other power apps, where you can set up some data flows, that is automatically retrieving your data on daily basis and reading the output with power query.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy