How to filter only those columns whose value is increasing only

I have following data in quicksight:


now I want to apply filter such that only those columns shows which have monthly cost increasing only. for example “Amazon Managed Streaming for Apache Kafka” service cost continuously increasing for month Mar,Apr,May as 26K,28K,29K respectively. So this service should be included and visible in table, But other services like “Amazon Redshift” cost is not continuously increasing so it will be excluded and not visible to table. What can be possible way to doing this, either from Calculated Field or anything else…

Hi @AMOL_KUMAR_PANDEY

Can you create a calculated field that uses period over period difference, check if that’s greater than zero and filter for that?

For example:

ifelse(periodOverPeriodDifference(
	sum({usage cost}), 
	{date}, 
	MONTH, 
	1)>0,'Show','Do not show')

Then filter for that value ^

2 Likes

Thankyou @Max , Your provided solution work for me, But as you can see the screenshot

can I remove applied calculated field to first month, As when I apply filter it will exclude all rows because of “not show”

Hi @AMOL_KUMAR_PANDEY

You can add an or statement to the calculated field.

ifelse(periodOverPeriodDifference(
	sum({usage cost}), 
	{date}, 
	MONTH, 
	1)>0 OR avg(dateDiff({date},now(),'MM'))<1,'Show','Do not show')

Hey @Max , Actually I want that the created calculated filed using your formula is only applicable to last tow month (here in the screenshot is Apr 2023 and May 2023),not apply on Mar 2023, By Default it is applied on all three months, When I filter by Excluding “Do Not Show”, it will remove whole column of March 2023, Which I Don’t want. in March 2023 column it fetch previous month cost diff. which is not included in table just because I filter for past N (3) number of month on date. Is it possible?