Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Ravi_Nagmal
Contributor III
Contributor III

Urgent help on Set Analysis

Hi everyone,

My requirement is to show Fiscal Year Revenue as a default number if no filter is selected but if  I select Effective_Region filter or Channel_type filter then numbers should change based on filter selection. I am using below condition for the same but unable to get output. Please help its a bit urgent

sum({1<Effective_Region=P()>+<Channel_Type=P()>} if(
[DateOfConfirmation.autoCalendar.Date]>=yearstart(addyears(today(),0),0,4) and
[DateOfConfirmation.autoCalendar.Date]<=Yearend(addyears(today(),0),0,4), TotalFeesbeforetax))

Thanks in Advance

1 Solution

Accepted Solutions
Ravi_Nagmal
Contributor III
Contributor III
Author

@Chanty4u @Kushal_Chawda Thank you for the prompt reply...Below logic worked for me.

sum({1<Effective_Region=P(Effective_Region),Channel_Type=P(Channel_Type)>} if(
[DateOfConfirmation.autoCalendar.Date]>=yearstart(addyears(today(),0),0,4) and
[DateOfConfirmation.autoCalendar.Date]<=Yearend(addyears(today(),0),0,4), TotalFeesbeforetax))

View solution in original post

4 Replies
Chanty4u
MVP
MVP

Try this

if(IsNull(Effective_Region) and IsNull(Channel_Type),  sum({1<[DateOfConfirmation.autoCalendar.Date]={">=$(=YearStart(AddYears(Today(), 0), 0, 4)))<=$(=YearEnd(AddYears(Today(), 0), 0, 4)))"}>} TotalFeesbeforetax),

   sum({1<Effective_Region=P(Effective_Region)> + <Channel_Type=P(Channel_Type)>} TotalFeesbeforetax)

)

Ravi_Nagmal
Contributor III
Contributor III
Author

Thanks for you response @Chanty4u , But it is not working

Kushal_Chawda

@Ravi_Nagmal  create variable on front end

vDynamicIdentifier = if(GetSelectedCount(Effective_Region)>0 or GetSelectedCount(Channel_Type),'$','1')

then use below expression

sum({$(vDynamicIdentifier)<[DateOfConfirmation.autoCalendar.Date={">=$(=yearstart(addyears(today(),0),0,4))<= $(=Yearend(addyears(today(),0),0,4))"}>} TotalFeesbeforetax)

 

 

Ravi_Nagmal
Contributor III
Contributor III
Author

@Chanty4u @Kushal_Chawda Thank you for the prompt reply...Below logic worked for me.

sum({1<Effective_Region=P(Effective_Region),Channel_Type=P(Channel_Type)>} if(
[DateOfConfirmation.autoCalendar.Date]>=yearstart(addyears(today(),0),0,4) and
[DateOfConfirmation.autoCalendar.Date]<=Yearend(addyears(today(),0),0,4), TotalFeesbeforetax))