Forum Discussion
Compare dates from two different tables
vanessafvg I am not joining anything!
I am trying to find out, which date is greater from the both tables and if its greater give me 1 else 0.
Thanks!
if you are just trying to get the max date from each table
ie.
isgreater =
VAR maxtable1 =
CALCULATE ( MAX ( table1[date] ) )
VAR maxtable2 =
CALCULATE ( MAX ( table2[date] ) )
RETURN
IF ( maxtable1 > maxtable2, 1, 0 )
- JCK25 years agoHelper III
My purpose is to find out the
Tickets open at the end of each month.
Also want to know, what was the status of that ticket last month.
For eg;
I have a ticket, which is opened in 1st July and closed on 25th September.
For the month of 31st July the status is open.
For the month of August the status is open.
But for the month of September it is closed.
So I want to see the status of ticket per month as it is, till it get closed. (In this case July-Open, Aug-Open), If I pull a report in December, I still want to see the same status.
I am using the date closed to identify if a ticket is open or closed.
To achieve this, I am brining an external table, called of end of month, which is formatted and has all dates similar to my date closed table… from 2018 and want to use the below logic ( don’t know if it works ☹)
If date closed > end of the month (external table) – ( This will bring the closed ones also)
|| isblank date closed – check the status
&& date opened<= end of month, 1,0 ( This will limit my ticket to less than end of month)
I will use end of month date as a filter 😊
- JCK25 years agoHelper III
My purpose is to find out the
Tickets open at the end of each month.
Also want to know, what was the status of that ticket last month.
For eg;
I have a ticket, which is opened in 1st July and closed on 25th September.
For the month of 31st July the status is open.
For the month of August the status is open.
But for the month of September it is closed.
So I want to see the status of ticket per month as it is, till it get closed. (In this case July-Open, Aug-Open), If I pull a report in December, I still want to see the same status.
I am using the date closed to identify if a ticket is open or closed.
To achieve this, I am brining an external table, called of end of month, which is formatted and has all dates similar to my date closed table… from 2018 and want to use the below logic ( don’t know if it works ☹)
If date closed > end of the month (external table) – ( This will bring the closed ones also)
|| isblank date closed – check the status
&& date opened<= end of month, 1,0 ( This will limit my ticket to less than end of month)
My purpose is to find out the
Tickets open at the end of each month.
Also want to know, what was the status of that ticket last month.
For eg;
I have a ticket, which is opened in 1st July and closed on 25th September.
For the month of 31st July the status is open.
For the month of August the status is open.
But for the month of September it is closed.
So I want to see the status of ticket per month as it is, till it get closed. (In this case July-Open, Aug-Open), If I pull a report in December, I still want to see the same status.
I am using the date closed to identify if a ticket is open or closed.
To achieve this, I am brining an external table, called of end of month, which is formatted and has all dates similar to my date closed table… from 2018 and want to use the below logic ( don’t know if it works ☹)
If date closed > end of the month (external table) – ( This will bring the closed ones also)
|| isblank date closed – check the status
&& date opened<= end of month, 1,0 ( This will limit my ticket to less than end of month)
End of Month
Condition 1
Condition 2
&& Condition 3
Status
July
1
1
1
Open
August
1 1 1 Open
September0
0
1
Closed
October
0 0 1
Closed
I will use end of month date as a filter 😊
- JCK25 years agoHelper III
My purpose is to din out;
a) Ticket open at the end of each month
b) also want to know, what was the status of that ticket last month.
For eg: I have a ticket which is opened in 1st July and closed on 25th Sept.
Ticket Status will be
end of month July- Open
end of month Aug-Open
end of month Sep- Closed
I want to see the status of ticket per month as it is, till it get closed. if i pull the report in dec, it should show me ( July= Open, Aug= Open and Sept = Closed). I use date ticket closed to determine open and close.
To achieve this, I am brining an external table, called end of month, which is formatted and has all dates similar to my date tables and want to use the blow logic.
If date closed> end of month ( different table) || - this wil bring all the closed one.
Isblank date closed- to check current status &&
date opened<= end of month,1,0) - to limit my ticket to less than end of month.
End of month Condtion 1 Condition 2 Condition 3 Status July 1 1 1 Open Aug 1 1 1 Open Seven 0 0 1 Closed Oct 0 0 1 Closed