Forum Discussion
GCH_FR
2 years agoHelper I
How to do a calculation between date variable
Hello Here, I've got some problem with how to create a good calculation, let me explain my problem : I've got a table name "FUP" DATE DEBUT ACTION BPA TEMPS THEORIQUE BPA PAR JOUR D...
- Anonymous2 years ago
Hi GCH_FR ,
bhanu_gautam 's workaround is vaild, but somehow it doesn't work.
Please allow me to share my insights.
Create this calculated table.
Table 2 = FILTER(CROSSJOIN(CALENDAR(MIN('Table'[DATE DEBUT ACTION BPA]),MAX('Table'[DATE FIN ACTION BPA])),'Table'),[Date]>=[DATE DEBUT ACTION BPA]&&[Date]<=[DATE FIN ACTION BPA])You can create table visual to check data:
I have a question, I select the 1/16/2024 rows of [Date], and I found that 4 values match, but the expected result you provided was only 1.9 + 1.91 + 1.92, please why doesn't 3.17 belong?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
GCH_FR
2 years agoHelper I
Thanks for your answer, it's work well but how can i add some others conditions like that
MEASURE TEMPS THEO CONCEPTION =
VAR CurrentDate = MAX('CALCUL FUP TEMPS THEORIQUE'[Date])
RETURN
SUMX(
FILTER(
'FUP',
'FUP'[CODIFICATION]="2-CONCEPTION"&&'FUP'[DATE DEBUT ACTION BPA] <= CurrentDate &&
'FUP'[DATE FIN ACTION BPA] >= CurrentDate
),
'FUP'[TEMPS THEORIQUE BPA PAR SEMAINE]
)
It seem not work very well... I try with ALL() but not either.
And after i can i do cumulative time like that : CUMULATE THEO = day 1 = day 1, day 2 = day 1 + Day 2
bhanu_gautam
2 years agoSuper User
GCH_FR , I have already shared updated measure as per your condition and for cummulative also