Forum Discussion

rvickersevotix's avatar
rvickersevotix
Cloud Apps
08-16-2022
Solved

Grouping Data Into Ranges - Front End

I have a set of data that gives out a Numerical Number for MAX(Score).

I want to count the number of each record that falls into a set of ranges.

100-96, 95-90, 89-85, 84-80, 79-75 and <75

My case statement is starting like this:

Case
When (max([Score]) > 96) then '100%-96%'
when (max([Score]) < 96) and (max([Score]) > 90) then '95%-90%'
when (max([Score]) < 90) and (max([Score]) > 85) then '89%-85%'
when (max([Score]) < 85) and (max([Score]) > 79) then '84%-80%'
when (max([Score]) < 79) and (max([Score]) > 74) then '79%-75%'
when (max([Score]) < 74) then 'below 75%'
end

Now I know that this doesnt work, because I need to be specific to Numbers I think, but I'm hoping someone can guide me in the right direction.

I am a complete noob when it comes to this.

  • harikm007's avatar
    harikm007
    08-16-2022

    Are you using Column/Bar/Line chart? If yes,  another option is to create separate value panels for each category.

    Formula would be:

    sum([Item ID], case when max([Value]) >= 0 and max([Value]) < 25 then 1 else 0 end)

    -Hari

     

4 Replies

Replies have been turned off for this discussion
  • Firstly, thank you, I will suggest that to my product team.

    Lets say I dont have access to make changes like that and I'm limited to front end case statements, If statements and script changes only?

    • harikm007's avatar
      harikm007
      Data Warehouse

      Are you using Column/Bar/Line chart? If yes,  another option is to create separate value panels for each category.

      Formula would be:

      sum([Item ID], case when max([Value]) >= 0 and max([Value]) < 25 then 1 else 0 end)

      -Hari