Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
lionking15
Creator
Creator

Issue in set analysis

  Find below sample data

IDNumberDateAmount
105/6/201610
108/6/201610
104/5/201710
115/5/201710
2025/6/201710
2015/8/201710
2025/8/201710

For Example If users select a date'15/8/2017'then first i have to see whether "ID"  fall under same fiscal year(Within 1st april to 31st march)

Output-(Not Needed)

 

IDNumberAmount
1010
1110
2030

My Requirement-

IDNumberAmount
1030
1110
2030

Scenario-For ID=1 we can see that 4/5/2017 and 5/5/2017 fall under this fiscal year and my output Value should search whether Number is falling under previous Fiscal year,Son on basis of Number i will bring previous year Amount in front of ID.


How can i achieve this within set analysis.

2 Replies
effinty2112
Master
Master

Hi Giridahar,

Add this line to your script:

if (Ceil(Month(Date) / 3)=1,Year(Date)-1 & '/' & Year(Date), Year(Date) & '/' & Text(Year(Date)+1) ) as [Fiscal Year],

Selecting on Fiscal Year is now easy. Set analysis not required.

If you can't access the script you could add

if (Ceil(Month(Date) / 3)=1,Year(Date)-1 & '/' & Year(Date), Year(Date) & '/' & Text(Year(Date)+1) )

as a calculated dimension in charts:

Fiscal Year ID Number sum(Amount)
2016/20171020
2017/20181010
110
2030

Regards

Andrew

lionking15
Creator
Creator
Author

I don't want fiscal year as my dimension.. And user will select a date on basis which value has to be calculated