Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cheskafausto
Frequent Visitor

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 2
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.