Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a question referring to SET ANALYSIS.
I have a bar chart with a dimension for calendar weeks on the x-axis.
As a KPI on the y-axis i would like to show a sum of items per calendar week.
An item has furthermore a property called 'informed', which is also a calendar week.
Now, i would like to count only those items, where the calendar week 'informed' matches the week on the x-axis.
I tried the following but its not working.
Count
(
{
$<
property_1 = {1},
property_2 -= {19,9,25},
property_informed = [calendar_week]
>
}
distinct item_id
)
Cal somebody give me some advice?
Basically i would like to compare datafields with datafields in SET analysis.
One way that might work is creating a condition when you load the script. Something like:
Load
...
property_informed
...
if(property_informed=calendar_week,1,0) as property_info
And then, in the set analysis expression:
Count
(
{
$<
property_1 = {1},
property_2 -= {19,9,25},
property_info = {1}
>
}
distinct item_id
)
Hi,
Please check that property_informed and calendar_week are in the same date format.
It is both a number value, e.g. 201732.
One way that might work is creating a condition when you load the script. Something like:
Load
...
property_informed
...
if(property_informed=calendar_week,1,0) as property_info
And then, in the set analysis expression:
Count
(
{
$<
property_1 = {1},
property_2 -= {19,9,25},
property_info = {1}
>
}
distinct item_id
)
please post some sample data and expected output
Ok thats one way to go - works for me, thanks.
One other way without modifying the script would be like this
Count
(
{
$<
property_1 = {1},
property_2 -= {19,9,25},
item_id = {"=property_informed = [calendar_week]"}
>
}
distinct item_id
)