Forum Discussion
help for date segment filter
- 7 years ago
Hi Anonymous ,
You can just change the variable "s" in the second formula to the calculate the turnover sale range if the value in this row.
Sakrange = VAR s = [cost] / [total] RETURN IF ( s > 1, ">1", IF ( s > 0.5, "0.5 - 1", IF ( s > 0.25, "0.25 - 0.5", IF ( s > 0.1, "0.1 - 0.25", "<0.1" ) ) ) )The Thought of this formula is just to calculate the value for each row and judge this value to create a new column by group.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank for your time and your answer ! I do the first visual it work good, For the second it's not a date range but a turnover sale range sorry for my writing .
Hi Anonymous ,
You can just change the variable "s" in the second formula to the calculate the turnover sale range if the value in this row.
Sakrange =
VAR s = [cost] / [total]
RETURN
IF (
s > 1,
">1",
IF (
s > 0.5,
"0.5 - 1",
IF ( s > 0.25, "0.25 - 0.5", IF ( s > 0.1, "0.1 - 0.25", "<0.1" ) )
)
)The Thought of this formula is just to calculate the value for each row and judge this value to create a new column by group.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.