Forum Discussion
How to restrict data in query editor
- Anonymous8 years ago
HI panipat1990,
I think you are talk about query parameter which create in query editor, right?
If this is a case, current query parameter can setting dynamic list from other query, but it not support setting dynamic value based on above list.
For your requirement, I'd like to suggest you direct use #"query name"['column name'] with list.max function to get dynamic value, then use it in filter steps.
Sample:
Regards,
Xiaoxin Sheng
So do you mean a dynamic range of dates? eg, always the 4 months relative to the current date?
Yes Current date to last 4 month's data dynamic
- Phil_Seamark8 years agoMicrosoft Employee
I created a blank query and used the following M code and named it dateParam
let Source = Date.From(Date.AddMonths(DateTime.From(Date.StartOfMonth(DateTimeZone.FixedUtcNow())),-4)) in SourceThis generated a single value of 1/12/2017 (d/MM/yyyy)
I then edited my main table to incorporate this parameter in a filter
#"Filtered Rows" = Table.SelectRows(#"Changed Type1", each [Date] > dateParam)
I've attached a simple model to show it working.
- panipat19908 years agoHelper III
Kindly guide me step by step i didnot understand.where i applied same step
- panipat19908 years agoHelper III
Kindly help me Step by step.
From date Quries
To date Quires
- panipat19908 years agoHelper III
How to make parameter..
I go parameter then kindly tell me option what i select..query list,suggested value
- panipat19908 years agoHelper III
Dear Sir,
When i used as you sending code.it is createing error when i filter the My fact table
Expression.Error: A cyclic reference was encountered during evaluation.
Why this errror..Kindly Help me