HiI am working with Amazon Quick Sight Q Topic where I want to create verified questions for Charges, Payments, and Adjustments in the last 7, 15, and 30 days.
My dataset has a field charge service date along with Charge Amount, Payment Amount, and Adjustment Amount.I have created the calculated fields for 7,15 and 30 days timeframe and also charges, payment and adjustments amounts to be displayed.
I tried creating verified questions like:
Total charges, payments, and adjustments in the last 15 days.
Total charges in the last 7 days.
However, when I test in Q, the filter for last 7 or 15 days is dropped automatically and Q shows results without applying the date condition (screenshot attached).
Actually there is no date for 15 days and how 15 days is getting calculated : Created calculated fields using ifelse(dateDiff(ChargeServiceDate, now(), ‘DD’) <= 15, Charges, 0) but Q seems to ignore this and not showing the desired result. same goes for 7 days and 30 days for Charges,payments and adjustments.
Also in custom instructions i have added : When a user asks for Charges,Payment and adjustments total in a timeframe (like last 7, 15, or 30 days) data, do not drop the date filter even if no results are found. Instead, return 0 or ‘No records available’.
So it should show ‘No records available’
I have also used the flag for relative time frames.ifelse(
dateDiff(ChargeServiceDate, now(), ‘DD’) <= 15,
‘Yes’,
‘No’
)
Expected behavior:
When I ask “Total charges in last 15 days”, Q should apply a relative date filter (ChargeServiceDate: Last 15 days from today).
Actual behavior:
Q drops the filter and shows total values for all time.
Questions:
1.Is this a limitation of Quick Sight Q Topic with dynamic relative dates (last X days)?
2.What is the best practice to implement rolling windows (7, 15, 30 days) in Q Topics for verified questions?Calculating from current date- charge service date for all (7,15,30 days time frame)
