I have a customer billing dashboard, I need to create a filter for a numerical field between values.
For example: between 0 to 200M (200000000), between 200M to 500M.
The field to be filtered has integer values 200000000, 300000000, 400000000.
How can I create this filter?
Hello @alanwutke , welcome to the QuickSight community! For this filter you want to create, are you wanting a user to be able to select through specific groupings of values like you described above or do you want them to be able to specify the groupings they would filter by?
One option would be to create 2 parameter values that the client could choose from:
GroupStart - 0, 200, 300, 400, etc
GroupEnd - 200, 500, 700, etc
Then set up a calculated field that would check if your Numerical field value is greater than GroupStart
and less than GroupEnd
then return that value, else NULL. Then filter your calculated field to exclude nulls. In the filter you can select Does Not Equal and then leave the field blank.
Try this out and let me know if it works!
Hello, @DylanM thank you for your feedback.
The idea and the user can choose the initial and final value, and search only this range of values.
I tried to create the parameters and the calculated field, but I receive an error in the field due to the data type:
for function >= has incorrect argument type Decimal >= . Function syntax expects '<COMPARABLE_TYPE> >= <COMPARABLE_TYPE>
Hello @alanwutke , when you created the parameters make sure you set a default value and try setting it to a Number value if you tried integer or vice versa. Also, you will want to multiply the value returned from the parameter to ensure it matches the values being returned from your dataset and is comparing in the millions.
If you continue to run into an argument error after altering the type of value used in the parameter let me know and we can try to think of a different solution!
Hello @DylanM , thank you for the answer, I tried to use numeric and integer parameters, but I still get an error when creating the calculated field:
Expression >= ${ExpectativaStart} AND decimalToInt({expect_sales}) for function >= has incorrect argument type Number >= Number List. Function syntax expects ‘<COMPARABLE_TYPE> >= <COMPARABLE_TYPE>’
@DylanM Sorry for my error, I was informing the multi-values parameter, I set it to single value and in the control I added the desired values. That’s how it resolved.
Thanks
@alanwutke ah yes, those will cause issues as well. Good catch! I am glad you were able to resolve this.