Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create two conditions in set analysis expression for bar chart

Hi i have two conditions in set analysis

first one - to filter not fixed first time records

second one - to get last 3 months of data in a data load which has last 12 months of data .

Capture1.PNGCapture2.PNG

capture3.PNG

the last image i am using expression to filter "not fixed first time" , but i also need to filter last 3 months in this expression now.

thanks in advance

1 Solution

Accepted Solutions
rubenmarin

Hi Aditya, you can use:

Count({<[dfft_Fix Time]={'Not fixed first time'}, [dfft_Closing Date]={'>=$(=MonthStart(Max({1} [dfft_Closing Date]), -3))'}>} [dfft_Enterprise System]) / Count({<[dfft_Closing Date]={'>=$(=MonthStart(Max({1} [dfft_Closing Date]), -3))'}>} [dfft_Enterprise System])

This will return data since 01/11/2014, if you want data since 16/11/2014 you can use:

Count({<[dfft_Fix Time]={'Not fixed first time'}, [dfft_Closing Date]={'>=$(=Floor(AddMonths(Max({1} [dfft_Closing Date]), -3)))'}>} [dfft_Enterprise System]) / Count({<[dfft_Closing Date]={'>=$(=Floor(AddMonths(Max({1} [dfft_Closing Date]), -3)))'}>} [dfft_Enterprise System])

View solution in original post

2 Replies
Gysbert_Wassenaar

You can use the + operator to AND two set modifiers. Something like count({<B={'abcd'}>+<MyDate={'>=$(=floor(addmonths(max(MyDate),-3)))'}>}A).


talk is cheap, supply exceeds demand
rubenmarin

Hi Aditya, you can use:

Count({<[dfft_Fix Time]={'Not fixed first time'}, [dfft_Closing Date]={'>=$(=MonthStart(Max({1} [dfft_Closing Date]), -3))'}>} [dfft_Enterprise System]) / Count({<[dfft_Closing Date]={'>=$(=MonthStart(Max({1} [dfft_Closing Date]), -3))'}>} [dfft_Enterprise System])

This will return data since 01/11/2014, if you want data since 16/11/2014 you can use:

Count({<[dfft_Fix Time]={'Not fixed first time'}, [dfft_Closing Date]={'>=$(=Floor(AddMonths(Max({1} [dfft_Closing Date]), -3)))'}>} [dfft_Enterprise System]) / Count({<[dfft_Closing Date]={'>=$(=Floor(AddMonths(Max({1} [dfft_Closing Date]), -3)))'}>} [dfft_Enterprise System])