Forum Discussion
Anonymous
5 years agoNot applicable
Only show visual if there is data
I use API requests to retrieve data about events. If there are ongoing events, the source returns a table with columns and rows of data, and if not the API simply returns "null". I also present some ...
- 5 years ago
Anonymous You will need to modify your query so that if the API returns "null" that you still return a table with the columns. This should fix your data refresh issue as well as well as your visuals issue, something along the lines of:
let Source = <some api call> NextStep = if Source = null then Table.FromRecords( ... ) else Source <rest of your steps> in <last step>
Greg_Deckler
Community Champion
5 years agoAnonymous Is it possible to share the code from Advanced Editor, probably don't need all of it. I need to see how I can test this.
Anonymous
5 years agoNot applicable
Greg_Deckler Turns out the problem was caused by some unrelated spagetti code, and I was able to get it working using your solution. Thank you for your help!