Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to create a scatter plot and dynamically limiting the number of rows that it uses to calculate the values. Below is the sample data that I am using.
How do I use a variable to limit the data rows using the counter field? Foe example, I only want to include rows where Counter <=5 or Counter <=8. Essentially controlling the scatter plot for Top N rows using a variable to calculate the values dynamically.
I can use counter in the filter pane. However, I need to give limited values like Top 5, Top 10, Top 15 etc. to limit the rows used for calculation of the values.
Thank you for the help.
A | X | Y | Counter |
A1 | 2 | 5 | 1 |
A1 | 5 | 2 | 2 |
A1 | 1 | 3 | 3 |
A1 | 3 | 4 | 4 |
A1 | 5 | 5 | 5 |
A1 | 5 | 4 | 6 |
B1 | 4 | 1 | 1 |
B1 | 3 | 3 | 2 |
B1 | 5 | 4 | 3 |
B1 | 4 | 2 | 4 |
B1 | 4 | 4 | 5 |
B1 | 5 | 2 | 6 |
B1 | 5 | 4 | 7 |
B1 | 3 | 5 | 8 |
B1 | 3 | 2 | 9 |
B1 | 2 | 5 | 10 |
B1 | 1 | 1 | 11 |
B1 | 1 | 5 | 12 |
B1 | 5 | 5 | 13 |
B1 | 4 | 2 | 14 |
B1 | 5 | 3 | 15 |
A1 | 1 | 3 | 7 |
A1 | 5 | 5 | 8 |
A1 | 3 | 5 | 9 |
A1 | 3 | 2 | 10 |
Regards, Abhishek.
Try to follow this
1) Create one Variable like input box
2) Create the measure like Sum({<Counter={"$(Variable1)"}>} Counter)
3) Else, You can use 2 variables as well like 1st step
4) Expression should be Sum({<Counter={">=$(Variable1)<=$(Variable2)"}>} Counter)
etc..
Thank Anil!
I did try this approach but was getting an error as I was using the less than symbol outside the brackets.
I updated the solution to the one given below and it works like a charm!
Sum({<Counter ={"<=$(Variable1)"}>} X).
Regards, Abhishek
Try to follow this
1) Create one Variable like input box
2) Create the measure like Sum({<Counter={"$(Variable1)"}>} Counter)
3) Else, You can use 2 variables as well like 1st step
4) Expression should be Sum({<Counter={">=$(Variable1)<=$(Variable2)"}>} Counter)
etc..
Thank Anil!
I did try this approach but was getting an error as I was using the less than symbol outside the brackets.
I updated the solution to the one given below and it works like a charm!
Sum({<Counter ={"<=$(Variable1)"}>} X).
Regards, Abhishek