Hi
I have created a pivot table that presents data1 filtered by date x-y.
I have created a second pivot table that presents data2 filtered by date t-z.
Data1 and data2 are the same integers but represent different dates.
I want a third table to get the calculation of data1/data2.
Thanks
Hello @yoavah , welcome to the QuickSight community!
To clarify, do you want to create a calculated field that calculates data1
/data2
after both have been filtered by different date ranges? Also, do they belong to the same dataset and are the date ranges from the same date field in your dataset(s)?
My thought is to create parameter controls for the filtering. So ParamDateX
etc… This would manage the filtering instead of hardcoded filters and would allow you to pass the date choices to your calculations. Next create the calculations:
Data1 From Filters
= ifelse({DateField} >= ${ParamDateX} AND {DateField} <= ${ParamDateY}, {data1},NULL)
Do the same for data2 with the corresponding dates.
Final Calc
= {Data1 From Filters}/{Data2 From Filters}