Forum Discussion
Time calculation with DAX or conditional column
- 3 years ago
It try it with a calculated table (not in Power Query Editor), it works with time and datetime:
Column = if('Table'[Carrier]="JET BLUE",'Table'[time]-'Table'[time frame]) - 3 years ago
In my example
Column = if('Table'[Carrier]="JET BLUE",'Table'[time]-'Table'[time frame])
both time.
I do not understand your question 🙂
Please post some example data with the table function, no screenshot please
Hi,
Let me show you:
1. I try to create a conditional column. For example. if Carrier = Jet Blue, Time Frame = 75 (minutes).
Then created a custom colum to subtract time_frame from real time (Hora ATD):
Here is the Error:
I think might be the data type I selected for time_frame.
Please let me know iyour comments.
Thanks,
2. Then I tried to subtract the time frame from Time column. But the result is the time itself and not the subtracted calculated time.
Then
- andhiii0798453 years agoSolution Sage
Hora ATD is a real time or and you want to subtract hours from it? This is not possible. You need something like this:
https://community.powerbi.com/t5/Desktop/How-to-add-hours-to-DateTime-data/td-p/104443- Pamdelorbe3 years agoFrequent Visitor
Yes. Hora ATD is a real time and depending the carrier I would like to subtract 90, 75 or 30 minutes in order to obtain a new colum with the subtracted exact time.
Thanks,
- andhiii0798453 years agoSolution Sage
Hora ATD has the datatype "datetime", right? Or "time"?