Dynamic Changes in diagram depending dimension selection

I had a case where I needed a diagram to change dynamically depending on the users selection. 

In the following picture, only country is selected, and is compared to the whole of our company. 


If then the user selects a customer, the diagram should show a line for the country and the customer like this:

To achieve this I made a user dimension:

In my case I made:

Column 1: ignore all the dimension selection (to ensure not matter the selection, this will show our company total)

Column 2: Ignore Customer dimension

Column 3: Ignore Country selection

Column 4: Ignore Nothing (this will be the column, to check against to determine what selection has been made)


Then we make a calculation as a measure to determine which column is "valid":

if sum(0,0,m1) = sum(d-1,0,m1) then 1 else 0

Then I hide all columns in visibility agent where m2 = 0 

value = 0 


This leaves us with just the active column, and then we need the column to compare too which is achieved by making a new visibility agent, that shows columns instead of hiding. 

sum(1, 0, m2) = 1

What it does is it checks whether the column to the right is valid, if so then show the column to the immediate left.




Please sign in to leave a comment.

Didn't find what you were looking for?

New post