
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using an expression within Set Analysis
Hello,
I am trying to use an expression within a set analysis, but I cannot make it work.
I have an expression called Lost_Minutes which is calculated as follows:
=SUM(th_late_st)
+SUM(th_early_fin)
I would then like to use this expression in a set analysis in the same chart, so that I can count the number of times (using the th_ses_id field) the result in the Lost Minutes expression is greater than 90.
=COUNT({<[Lost_Minutes]={">90"}>}th_ses_id)
However, this returns a count total of all possible values, instead of limiting it to just those where the Lost Minutes are greater than 90.
When I replace the Lost_Minutes expression with a dimension, as below, it works correctly.
=COUNT({<[th_early_fin]={">90"}>}th_ses_id)
Is it possible to use the Lost_Minutes expression in the set analysis, and if so, what am I doing wrong?
Thanks,
Paul
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't use an expression label in a set expression. What you can do is to use an expression in the search clause as per Massimo's example.
=Sum({<[Session ID] = {"=([Late Start (Calculation)]+[Early Finish (Calculation)]) > 90"}>}
[Late Start (Calculation)]+[Early Finish (Calculation)])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this is an example
sum({$<product={"=(sum(v)+sum(z))>47000"}>} v)
try to adapt to your question or post some data
Preparing examples for Upload - Reduction and Data Scrambling

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks - I have attached an example.
In the top table, the Lost_Minutes expression is working correctly.
In the bottom table, I have used the label of this expression in a second expression, called Lost Minutes >90. I would like this to count the number of occasions that the Lost Minutes in a session is greater than 90 minutes. However, at the moment, it is is counting all sessions, and not applying the >90 minutes condition.
Thanks,
Paul


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't use an expression label in a set expression. What you can do is to use an expression in the search clause as per Massimo's example.
=Sum({<[Session ID] = {"=([Late Start (Calculation)]+[Early Finish (Calculation)]) > 90"}>}
[Late Start (Calculation)]+[Early Finish (Calculation)])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - this worked as I had hoped.
Thanks both.
