Forum Discussion
refresh only if you have data
Hello I would like some help with dataset update.
Today I update my dataset every 2 hours with data from a database table called table_pivot.
This table is updated several times in the bank and in some periods it is empty (it is empty for some load errors)
What I need to do before updating my dataset is to make sure the table is populated, if it contains data in it, and only if it has any data the dataset is updated. I tried making a parameter and it didn't work.
Have you had anything like that? Could you help me with a solution?
Hug and thanks
Below is an example of logic just for understanding
let
Source = if Odbc.Query("dsn=bd001", "select count(*) from table_pivot") > 0
then Odbc.Query("dsn=bd001", "select count(*) from table_pivot")
else "do not update"
in
Source
1 Reply
- mwegenerMost Valuable Professional
Hi Anonymous ,
you could do it with a Flow.
https://powerbi.microsoft.com/en-us/blog/refresh-your-power-bi-dataset-using-microsoft-flow/
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.