Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
srujanaponnuru
Creator
Creator

Qliksense filters and link to table

Hi Team,

I have requirement as below:

I created a inline table Filter1 :

Load * Inline [

Filter1

0

5

10

15

20

];

In Front end, in a table i have a measure column named Total Sales.

In Total Sales i have written the logic as below:

 

=sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])

Now , if i select Filter1 value as 15 , my table should display sales greater than 15. i need to provide a link of Filter1 and Total Sales column in my table.

 

Please help me out.

 
Labels (1)
1 Solution

Accepted Solutions
Dmk
Contributor II
Contributor II

if(GetSelectedCount(FilterOverSales)>0, if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])>FilterOverSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]), if(GetSelectedCount(FilterUnderSales)>0, (sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])<FilterUnderSales,sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))), sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))

 

Im not sure if there are any brackets missing but should be fine

View solution in original post

16 Replies
Anil_Babu_Samineni

If you select 10 & 15 ?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
srujanaponnuru
Creator
Creator
Author

No the user has to select only one value in the filter1.

Anil_Babu_Samineni

How about this?

=If(GetSelectedCount(Filter1)>0, sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}, Filter1={"$('>=' &=Max(Filter1))"}>}[Sales]), sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
srujanaponnuru
Creator
Creator
Author

Thank you. However, Filter1={"$('>=' &=Max(Filter1))" this part is not working in my file. and i am getting all blanks in my table. 

Please help.

Anil_Babu_Samineni

That will work, But may be?

sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}, Filter1={[>=$(=Max(Filter1))]}>}[Sales])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
srujanaponnuru
Creator
Creator
Author

No luck 😞

its taking sum(sales) but not >=max(filter1). If i click 15 from Filter1, the output shows all values. It is not showing greater than 15 in the table.

Anil_Babu_Samineni

Please attach sample file

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
srujanaponnuru
Creator
Creator
Author

Sorry cannot attach any sample file as i am working in client network. 

 

Dmk
Contributor II
Contributor II

Hello Srujanaponnuru,

 
Try this:

 

if(GetSelectedCount(Filter1)>0,
            if(sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])>Filter1,sum({<[Year]=                                               {"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales])),
                             sum({<[Year]={"$(=GetFieldSelections(Year))"}, [Type]={"*Forecast"}>}[Sales]))