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

condition on the field value in a listbox or slider

 

I have created a slider and give use to choose a value from a filed (say Date). how can I limit the user only have the option to choose the most recent 1 month’s date? thanks

 

1 Solution

Accepted Solutions
Anil_Babu_Samineni

You can use this if you don't have forecast dates in your field, This works either List and Slider objects

=If(Date >= Date(Max(TOTAL Date-30)) and Date <= Max(TOTAL Date), Date)

If, Forecast data is fetching then this?

=If(Date >= Date(Max(TOTAL Today()-30)) and Date <= Max(TOTAL Today()), Date)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

7 Replies
luismadriz
Specialist
Specialist

Hi,

Please use something like this as the dimension:

=AGGR(Only({<TransactionDate={">=$(=Date(Max(TransactionDate)-30))"}>} TransactionDate), TransactionDate)

I hope it helps,

Cheers,

Luis

Anil_Babu_Samineni

You can use this if you don't have forecast dates in your field, This works either List and Slider objects

=If(Date >= Date(Max(TOTAL Date-30)) and Date <= Max(TOTAL Date), Date)

If, Forecast data is fetching then this?

=If(Date >= Date(Max(TOTAL Today()-30)) and Date <= Max(TOTAL Today()), Date)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ronaldwang
Creator III
Creator III
Author

Hi Anil,

There is one issue with this expression, that is once you chose a date, the date available for next selection will be the chosen date to chosen date-30 only.

Anil_Babu_Samineni

Not sure, What you meant by Next selection? Perhaps remove = sign in second operator.

=If(Date >= Date(Max(TOTAL Date-30)) and Date < Max(TOTAL Date), Date)


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ronaldwang
Creator III
Creator III
Author

say, if I chose 1/9/2017 as current selection.

once the dashboard refreshed, if I want to change the date, the data available for selection change to 1/8/2017 to 1/9/2017 instead of 30/10/2017 to 30/11/2017. as Total Date changed to 1/9/2017

Anil_Babu_Samineni

If, We have something triggers assigned in your alternate triggers for some actions. You could constant them even filter selection won't effect to this?

Either one of these?

=AGGR(Only({<Date={">=$(=Date(Max(Date)-30)) <=$(=Max({1} Date))"}>} Date), Date)

OR

=If(Date >= Date(Max(TOTAL Today()-30)) and Date <= Max({1} TOTAL Today()), Date)

OR
=If(Date >= Date(Max(TOTAL Date-30)) and Date <= Max({1} TOTAL Date), Date)

- SAB

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
luismadriz
Specialist
Specialist

Hi,

I can't follow your explanation, but you may want to try this:

=AGGR(Only({<Date={">=$(=Date(Max({1} Date)-30))"}>} Date), Date)