Forum Discussion

cheskafausto's avatar
cheskafausto
Frequent Visitor
8 years ago

Managing relationship with filtered queries

Hi everyone,

 

I am currently using powerbi desktop to connect to an oracle 12cr2 database by direct query. 

 

I have a couple of queries (that are just copies of each other) that have been introduced to this filter below:

 

#"custom step"=Table.SelectRows(#"Name of Previous Step", each ([Datetime]) <=(DateTime.LocalNow()+#duration(0,0,X,0)))

 

where X is different time horizons, (5, 10, 15, 20 etc. ) for each of those queries. FYI, this filter is used to show some data over the next 5, 10 , 15 20 mins that is based on the local time of the machine. 

 

For example i have these 4 queries, that looks over the next 5 , 10, 15 , 20 mins of the current time. I would now like to be able to "LINK" ALL these queries in ONE graph, wherein I can use a SLICER to choose between what time horizon I want to view on that graph. 

 

I have tried merging, but the issue with that, i believe, is that the lengths of the columns are NOT the same. and also there are unique values i think. 

 

We have also tried looking into relationships between these tables, but it seems to have the same issue.

 

Is there a work around on this one? 

 

 

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Could you add a custom column to each query that identifies its time horizon and then Append all of them together? Sorry, I am not visualizing how your data looks very well, sample/example data would help.

    • cheskafausto's avatar
      cheskafausto
      Frequent Visitor

      Hi smoupre,

       

      Thank you for your reply. 

       

      I think I understand your idea, but you think this appending action can be done automatically? 

       

      For example, if i have 4 separate queries that filters data from 12mn to currenttime of the day + next (5, 10, 15, 20mins)  (so technically, rows are unfiltered throughout the day) , will these still be reflected on to that appended query without any human intervention?