Forum Discussion
DATEADD CON PARAMETROS - NO FUNCIONA
Es posible hacer funcionar la funcion DATEADD con un parametro en vez un numero exacto? EStoy intentando esto pero no funciona:
- Anonymous2 years ago
Hi qwerty1253 ,
It seems to be able to work correctly, but I am not clear on what you intend, you can check the results below:
Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
7 Replies
- lukiz84
Memorable Member
Which data type is Parameters[valores_selected]?
Have you tried SELECTEDVALUE(Parameters[valores_selected])?
- qwerty1253Frequent Visitor
Hi, the values are integers. And the measure is: SELECTEDVALUE(Parameters[selected_values],0). Still, when I click on the filter, it doesn't seem to select it, it shows it fine on a card, but it doesn't take it to the function. The function returns the same date of origin, it does not add the N days.
- qwerty1253Frequent Visitor
Hi, the values are integers. And the measure is: SELECTEDVALUE(Parameters[selected_values],0). Still, when I click on the filter, it doesn't seem to select it, it shows it fine on a card, but it doesn't take it to the function. The function returns the same date of origin, it does not add the N days.
- lukiz84
Memorable Member
maybe you could do the original post in english too?
and maybe show a little of your data and model (relationships)?
- qwerty1253Frequent Visitor
Thanks Lukiz, its goes on English:
"""
Is it possible to make the DATEADD function work with a parameter instead of an exact number? I'm trying this but it doesn't work:
Due_date_extended = dateadd('Ventas'[dueDate], Parametros[selected_values], day)
Parametros[selected_values] is a SELECTVALUE of correlative numbers between 1 and 20.
I inserted that same value in a filter to be able to select one at a time, and make it the chosen one to "work" in the DATEADD function, but it does not work, it seems, despite being selected, to be delivering BLANK to the function.
The selectvalue seems correct as if I drop it on a card it shows the chosen value.
Any suggestions to return a dynamic DATEADD with parameters who can be selected in a filter?"""I dont have relation between tables PARAMETERS and VENTAS. But, Parameteres should works anyway or not? i mean, is a Select variable , can it iterate whit a function of date?
- qwerty1253Frequent Visitor
Any idea? i dont get it yet :S
- AnonymousNot applicable
Hi qwerty1253 ,
It seems to be able to work correctly, but I am not clear on what you intend, you can check the results below:
Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.