Forum Discussion
Group data in intervals
- 5 years ago
Anonymous , Create a new column like
Switch(true(),
[Depth] <=1 , " 0-1",
[Depth] <=2, " 1-2",
[Depth] <=3 , "2-3"
)and then take sum "number of" or count of "number of" in the visual with this new column
- Anonymous5 years ago
Perfect, if I have empty values it is currently added to the interval 0-1, how do I make it so the blank/empty cells are also empty/blank in the new Interval Column?
Edit:
Figured out the Blank handling.
DybdeInterval = Switch(true();Knude[Dybde] = Blank(); Blank();Knude[Dybde] <1 ; "0-1";Knude[Dybde] <2; "1-2";Knude[Dybde] ❤️ ; "2-3")How do I make sure it doesn't count negative values? Right now Negative values are counted in 0-1 group, can you have two different conditions in a group?Edit 2:Think I figured out how to handle negative values, let me know if my syntax is wrong.DybdeInterval = Switch(true();Knude[Dybde] = Blank(); Blank();Knude[Dybde] >0 && Knude[Dybde] < 1; "0-1";Knude[Dybde] >0 && Knude[Dybde] <2; "1-2";Knude[Dybde] >0 && Knude[Dybde] < 3 ; "2-3";Knude[Dybde] >0 && Knude[Dybde] <4 ; "3-4")
Anonymous , Create a new column like
Switch(true(),
[Depth] <=1 , " 0-1",
[Depth] <=2, " 1-2",
[Depth] <=3 , "2-3"
)
and then take sum "number of" or count of "number of" in the visual with this new column
Perfect, if I have empty values it is currently added to the interval 0-1, how do I make it so the blank/empty cells are also empty/blank in the new Interval Column?
Edit:
Figured out the Blank handling.
- amitchandak5 years agoSuper User
Anonymous , Thanks for posting the solution finally worked. Sorry I saw this late. Marking your replay as a solution too.