Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I need help with a calculation that I can't finish, well in this calculation I have a dimension and a variable.
The dimension, max(COMPETENCE) goes up to the date of 01/09/2022 , but I need this calculation to only be applied to dates less than or equal to 01/07/2022.
As a variable, v_ultima_comp_fechada has this value: =makedate(2022, 7)
In this way it is apparently correct because the month in which the calculations are being carried out is Max(COMPETENCE) which is 09/01/2022 which is my criterion of 01/01/2022 the value comes ZERO as DESIRED!
But when added in another column with a data less than or equal, for example: ViniciusOrtis03_1-1663871168090.png
COMPETENCE = {"$(=Date(MonthStart(max({<COMPETENCE={'<=$(v_ultima_comp_closed)'}>}COMPETENCY),-2)))"
Where COMPETENCE = 01/07/2022
v_ultima_comp_closed = 01/07/2022
Calculus keeps coming to zero again
your problem should be here
{'<=$(v_ultima_comp_closed)'}
Because when you want to evaluate >, >=,< or <= you should be using double quotes.
and don’t know what’s the -2 does
so, you can try this
COMPETENCE = {'$(=Date(MonthStart(max({<COMPETENCE={"<=$(v_ultima_comp_closed)"}>}COMPETENCY))))'}
best,
your problem should be here
{'<=$(v_ultima_comp_closed)'}
Because when you want to evaluate >, >=,< or <= you should be using double quotes.
and don’t know what’s the -2 does
so, you can try this
COMPETENCE = {'$(=Date(MonthStart(max({<COMPETENCE={"<=$(v_ultima_comp_closed)"}>}COMPETENCY))))'}
best,
Hello @RafaelBarrios , Thanks for the answer, really worked.
GREAT !!!!!
you were really really close
hahahaa yes, i didn't see, the difference " and ' in expression