Forum Discussion
xxenoss
8 years agoHelper I
All possible date combinations
Hi, I'm trying to solve the trip duratiopn problem My data looks like this. The first column is the date the train travels to certain destination and returns back the same day. I need to find all p...
- 8 years ago
Hi xxenoss
Try this measure
Measure = SWITCH ( TRUE (), [max duration] = 1, 1, [max duration] = 2, "1,2", [max duration] = 3, "1,2,3", [max duration] = 4, "1,2,3,4", [max duration] = 5, "1,2,3,4,5", [max duration] = 6, "1,2,3,4,5,6", [max duration] = 7, "1,2,3,4,5,6,7", [max duration] = 8, "1,2,3,4,5,6,7,8", [max duration] = 9, "1,2,3,4,5,6,7,8,9", [max duration] = 10, "1,2,3,4,5,6,7,8,9,10" )Best Regards
Maggie
v-juanli-msft
8 years agoCommunity Support
Hi xxenoss
Try this measure
Measure =
SWITCH (
TRUE (),
[max duration] = 1, 1,
[max duration] = 2, "1,2",
[max duration] = 3, "1,2,3",
[max duration] = 4, "1,2,3,4",
[max duration] = 5, "1,2,3,4,5",
[max duration] = 6, "1,2,3,4,5,6",
[max duration] = 7, "1,2,3,4,5,6,7",
[max duration] = 8, "1,2,3,4,5,6,7,8",
[max duration] = 9, "1,2,3,4,5,6,7,8,9",
[max duration] = 10, "1,2,3,4,5,6,7,8,9,10"
)
Best Regards
Maggie
xxenoss
7 years agoHelper I
Thank you Maggie, this is brilliant,