Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
VictorNigretto
Contributor
Contributor

Use a condition to display the data, but not in dimension

Hi,

I have datas of 3 snapshots : 09/06/2020, 08/06/2020 and 07/06/2020.

On my page, I have 2 charts :

First one :

Data difference on 2 days (bar chart)

  • Dimension : My client
    • (=[client])
  • Measure : top 5 Difference of data between 09/06/2020 and 08/06/2020 snapshot
    • If(Rank(sum(if([date]= '08/06/2020', [data])) - sum(if([date]= '09/06/2020', [data]))) <=5,  sum(if([date]= '09/06/2020', [data])) - sum(if([date]= '08/06/2020, [data])))

 

Second one :

Data difference on 1 year (scatter plot)

  • Dimension : My client of 09/06/2020
    • (=if( [date]='09/06/2020', [client]))
  • Measure 1 : data of 09/06/2020 which is top 5 difference between current data and last year data
    • If(Rank(FABS([data] - [last year data])) <= 10, [data])
  • Measure 2 : last year data which is top 5 difference between current data and last year data
    • If(Rank(FABS([data] - [last year data])) <= 10, [last year data])

 

Problem is that, if I do a selection on my scatter plot, the dimension selected will be "if([date]='09/06/2020', [client]) and not [client], which will ruin the first chart. 

 

Do you have a solution to fix this problem ?

How can I add a condition on my selected data without putting it in the "dimension" ?

 

Thank you for your attention to my question

 

Labels (2)
3 Replies
Almen
Creator II
Creator II

Put the barchart into an alternate state (via master elements) so it won't be affected by the selection of your scatterplot.

VictorNigretto
Contributor
Contributor
Author

Hi,

THank you for your answer,

In fact, I would like to be able to keep the interaction between the charts.

The problem is that, If I do a selection on the scatter plot chart, it will select dimension "Client name with date = 08/06/2020"

And as the bar chart display : difference of data between 08/06/2020 and 07/06/2020, it will not show the difference anymore..

Almen
Creator II
Creator II

Maybe you can fix the measure by using SetExpression {1}.

 

If(Rank(sum({1}if([date]= '08/06/2020', [data])) - sum({1}if([date]= '09/06/2020', [data]))) <=5,  sum({1}if([date]= '09/06/2020', [data])) - sum({1}if([date]= '08/06/2020, [data])))