Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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 whether it is one country or another.
Type. Column with transport type. I have two types: Temporary or Definitive
What I intend to do is take the Date column of the Logistic table and add the number of years depending on the country so that it gives me an end date. For example if I have an order date on 02-03-21 and the number of years in that country is 4 years, give me an end date 02-03-25.
In addition to that I want to do it filtering only for those orders that the Type = Temporary.
I propose it in two steps:
That is what I am proposing. But it backs up for me:
TemploraryRestriction =
VAR _EndDate= MINX(
'fact_Excel_Logistic',
EDATE('fact_Excel_Logistic'[Date],MONTH('fact_Excel_Logistic'[Final Restriction])*12))
VAR TemporaryFilter= CALCULATE(
_EndDate,'fact_Excel_Logistic'[Type]="Temporary")
Return
TemporaryFilter
In addition, I would like Type=Temporary to execute the operation, and for Type= Definitive to return "Not applicable".
Thank you very much for your help.
Best regards.
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.
Hi,
I created a calculated column, is this your expected output?
TemploraryRestriction =
IF (
'fact_Excel_Logistic'[Type] = "Temporary",
EDATE (
'fact_Excel_Logistic'[Date],
'fact_Excel_Logistic'[Final Restriction] * 12
)
)
If this doesn't work, could you please give the expected output? Thanks.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 49 | |
| 33 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 38 | |
| 28 | |
| 25 |