Forum Discussion

User456's avatar
User456
New Member
1 year ago
Solved

Is this possible to do as a direct query?

I have been asked to create a report that will query a set of journals created on a server in the past year. It will need to pull the names of the journals from one table, using their EndMessageUTC's...
  • v-sathmakuri's avatar
    1 year ago

    Hi User456 ,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you Omid_Motamedise  and nathancwatkins  for the prompt response.

     

    The best practice is to create a view or stored procedure that merges the journal tables for you filtered on the date range and using the view in the power bi to view the data.

     

    If database views aren't available, you can use Power Query in Import mode to first query the table listing journal names using their 'EndMessageUTC' dates, filter it to journals from the past year, and then dynamically import data from each corresponding journal table by combining them. This approach leverages Power Querys dynamic data source capabilities to pull and merge data from multiple tables, but it requires Import mode since it’s not supported in DirectQuery.

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thank you!!