Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Variable (with Set Analysis) as Dimension for a Chart?

Hello,

I have a Straight Table with the Dimension NAME and the following Expressions:

  • Anomaly: COUNT({$<FLAG_STATUS={"Anomaly"}>} DISTINCT %ACCT_ID)
  • No Anomaly: COUNT({$<FLAG_STATUS={"No Anomaly"}>} DISTINCT %ACCT_ID)
  • Total: [Anomaly]+[No Anomaly]
  • Effectiveness: [Anomaly]/[Total]


That works great! But now I was requested to create some Line Charts:


Chart 1:

  • X Axis: Effectiveness values
  • Y Axis: # of Cases

Chart 2:

  • X Axis: Total values
  • Y Axis: # of Cases

The thing is that I have the Effectiveness and the Total calculated as Expressions and I need to use them as Dimensions for Charts.

Is there any way to create Variables, for example, to store the Set Analysis clauses and then use them as a Dimension in the Chart?

Or do you know any other solution to help me out to solve this?

Thanks!

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

CHART 1

Create a Calculated Dimension as Below


Aggr(COUNT({$<FLAG_STATUS={"Anomaly"}>} DISTINCT %ACCT_ID) /

(COUNT({$<FLAG_STATUS={"Anomaly"}>} DISTINCT %ACCT_ID)

+

COUNT({$<FLAG_STATUS={"No Anomaly"}>} DISTINCT %ACCT_ID)),%ACCT_ID)


expression

COUNT(DIstinct %ACCT_ID)


CHART 2

Create accordingly

View solution in original post

1 Reply
MK_QSL
MVP
MVP

CHART 1

Create a Calculated Dimension as Below


Aggr(COUNT({$<FLAG_STATUS={"Anomaly"}>} DISTINCT %ACCT_ID) /

(COUNT({$<FLAG_STATUS={"Anomaly"}>} DISTINCT %ACCT_ID)

+

COUNT({$<FLAG_STATUS={"No Anomaly"}>} DISTINCT %ACCT_ID)),%ACCT_ID)


expression

COUNT(DIstinct %ACCT_ID)


CHART 2

Create accordingly