Forum Discussion
Syndicate_Admin
2 years agoAdministrator
EDATE + CALCULATE
Good I have a Logistic (fact_Excel_Logistic) table that has the following columns: Date. Date on which the order goes out. Final Restriction. Number of years of restriction depending on whet...
Syndicate_Admin
2 years agoAdministrator
Good
Thanks for the answer, but I always try to avoid calculated columns and do it through measurements.
I have thought about this solution.
Do you see problems or have any improvement?
TemploraryRestriction =
WHERE _EndDate= MINX(
'fact_Excel_Logistic',
EDATE('fact_Excel_Tráfico'[Date],'fact_Excel_Logistic'[Final Restriction]*12))
WHERE TemporaryFilter= CALCULATE(
_EndDate,'fact_Excel_Logistic'[Type]="Temporary")
WHERE TypeAd=
CALCULATE(
.MAX('fact_Excel_Logistic'[Type]),
ALL(dim_TimeTable)
)
Return
SWITCH(
TRUE()
,TypeAd="Temporary",TemporaryFilter
,TypeAd="Definitive","ON"
," ")
You'll tell me.
Thanks a lot.