Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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 ...
  • Greg_Deckler's avatar
    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>