Hi,
So I'm having trouble trying to figure out how to subtract one column from the next depending on which is the later of the two dates in the column header. I'm trying this as the model will be ran each month and I don't want to have to manually input the dates into the formula like I have done below.
I used crosstab to output the date as the column header as this would have the two dates side-by-side rather than underneath (see input).
Now I'm having trouble performing a check along the lines of -> if (date in col 5) later than (date col 6), then (col 5 - col 6) else (col 6 - col 5).
I'm not sure how to determine a formula based off column headers as the dates will just be strings also.
Thanks
Hello,
This formula should work. Just make sure that the dates are on date format.
If [col 5] > [col 6] then DateTimeDiff([col 5],[col 6], "days") else DateTimeDiff([col 6],[col 5], "days") endif
User | Count |
---|---|
106 | |
85 | |
76 | |
54 | |
40 |