Showing results for 
Search instead for 
Did you mean: 

Referencing Filter Value in a Sisense Formula for Dynamic Data Display

9 - Travel Pro
9 - Travel Pro

I’m trying to switch the displayed data based on a user selected filter.

This would be done in Power BI using something like the below:

Value = SWITCH(TRUE(),

               [Selected Item] = “A” , Sum(A),

               [Selected Item] = “B” , Sum(B),

               [Selected Item] = “C” , Sum(A) / Sum(B)


I’d imagine if it’s possible in sisense it would utilize a case statement. Something like:


When  [Selected Item] = “A” then Sum(a)

When  [Selected Item] = “B” then Sum(b)

ELSE Sum(A) / Sum(B)


Can you reference the value of a filter in a value formula in sisense?


12 - Data Integration
12 - Data Integration

Hey @Laflet ,

It is possible in a way with using measure-filters. I havent tried it out, but you could try the following


When  Sum(Selected Item) = (Sum(Selected Item) , A) then (Sum(Selected Item) , A)

When  Sum(Selected Item) = (Sum(Selected Item) , B) then (Sum(Selected Item) , B)

ELSE Sum(A) / Sum(B)


What this formula does is compare the Sum of the Selected Items with the Sum of the Selected items where filter = A. If it is equal then the SUM of A will be taken otherwise it will go down to the next condition. 

Prerequisite is that the filter in (Sum(Selected Item) , A)  must be the same field as you are using on a dashboard level, otherwise this will not work. If it is the same it will work as follows:

It will check the sum of the selected item filtered on the filters used on dashboard-level and compare this to the same sum but filtered specifically for value A (other dashboard filters will also be applied). If it is equal it means that the user selected A if not the user selected something else or selected all.

More on measure-filters can be found here: