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: 
Ravi_Nagmal
Contributor III
Contributor III

How to Make filter work with set analys

Hi All,

I have created a measure with the help of set analysis to calculate last year revenue is user selects current year.

I am facing an issue is I have some filter like "Client_ID" and "Client_Type" If user select any values from this filter then that numbers to reflect current this number is not changing with any filter.

 

({1}{<Received_Date= {">=$(=Min(addmonths(addmonths(Received_Date,0,4),-12)))<=$(=Max(addmonths(Received_Date,-12)))"}> }
SUM(if(match( assignment_current_state,'Assignment') and match(is_rr_inquiry,'No') and match(Identifier,'Base_Table'),[USD Total Fees])))

1 Solution

Accepted Solutions
Aasir
Creator III
Creator III

({1< Client_ID = P(Client_ID), Client_Type = P(Client_Type) >}
{< Received_Date = {">=$(=Min(addmonths(addmonths(Received_Date,0,4),-12)))<=$(=Max(addmonths(Received_Date,-12)))"} >}
SUM(
if(
match(assignment_current_state, 'Assignment') and
match(is_rr_inquiry, 'No') and
match(Identifier, 'Base_Table'),
[USD Total Fees]
)
))

View solution in original post

5 Replies
jochem_zw
Partner Ambassador
Partner Ambassador

try this:

({$}{<Received_Date= {">=$(=Min(addmonths(addmonths(Received_Date,0,4),-12)))<=$(=Max(addmonths(Received_Date,-12)))"}> }
SUM(if(match( assignment_current_state,'Assignment') and match(is_rr_inquiry,'No') and match(Identifier,'Base_Table'),[USD Total Fees])))

Ravi_Nagmal
Contributor III
Contributor III
Author

Thanks @jochem_zw for prompt reply.

Filters are working now but for Fiscal year is not working now

Aasir
Creator III
Creator III

({1< Client_ID = P(Client_ID), Client_Type = P(Client_Type) >}
{< Received_Date = {">=$(=Min(addmonths(addmonths(Received_Date,0,4),-12)))<=$(=Max(addmonths(Received_Date,-12)))"} >}
SUM(
if(
match(assignment_current_state, 'Assignment') and
match(is_rr_inquiry, 'No') and
match(Identifier, 'Base_Table'),
[USD Total Fees]
)
))

Aasir
Creator III
Creator III

({$<Fiscal_Year=P(Fiscal_Year)>}
{<Received_Date={">=$(=Min(addmonths(addmonths(Received_Date,0,4),-12)))<=$(=Max(addmonths(Received_Date,-12)))"}>}
SUM(
if(
match(assignment_current_state, 'Assignment') and
match(is_rr_inquiry, 'No') and
match(Identifier, 'Base_Table'),
[USD Total Fees]
)
))

Ravi_Nagmal
Contributor III
Contributor III
Author

@Aasir This is working properly but i am getting less numbers then expected. What would be the reason ?

 

 

({1< Client_ID = P(Client_ID), Client_Type = P(Client_Type) >}
{< Received_Date = {">=$(=Min(addmonths(addmonths(Received_Date,0,4),-12)))<=$(=Max(addmonths(Received_Date,-12)))"} >}
SUM(
if(
match(assignment_current_state, 'Assignment') and
match(is_rr_inquiry, 'No') and
match(Identifier, 'Base_Table'),
[USD Total Fees]
)
))