Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please see the attached QVW.
Trying to get the count of ID with 75k Target but the expression is not working for me.Can anyone help me here please ?
Thanks much.
Are you counting Per Platform, Per Year >= 75k
May be try this script:
LOAD *,
AutoNumber(Platform&Year) as Key;
Load * Inline [
Platform,Year,Amount
ABC,2015,76000
ABC,2015,6000
ABC,2016,70999
ABC,2016,2000
DEF,2015,56000
DEF,2015,5000
DEF,2016,55000
DEF,2016,5000
];
And then this expression:
=Count({<[Year] = {'2016'}, Key = {"=Sum([Amount]) >=75000"}>} Platform)
=Count({<[Year] = {'2016'}, Key = {"=Sum([Amount]) < 75000"}>} DISTINCT Platform)
The QVW you attached does not contain a field ID and does not contain a field Target. Please explain what you're trying to do. Give examples.
Hey!
As far as I understood your issue the thing is that you get the number of IDs which reflects the number of rows in your model but not the number of IDs. To count the number of IDs you have to add distinct into your function:
=count({<[Year] = {'2016'}, Platform = {"=sum([Amount]) >=75000"}>} distinct Platform )
Then on your Bar-chart you will have 2 instead of 4.
Hope it helps
Elena
Are you counting Per Platform, Per Year >= 75k
May be try this script:
LOAD *,
AutoNumber(Platform&Year) as Key;
Load * Inline [
Platform,Year,Amount
ABC,2015,76000
ABC,2015,6000
ABC,2016,70999
ABC,2016,2000
DEF,2015,56000
DEF,2015,5000
DEF,2016,55000
DEF,2016,5000
];
And then this expression:
=Count({<[Year] = {'2016'}, Key = {"=Sum([Amount]) >=75000"}>} Platform)
=Count({<[Year] = {'2016'}, Key = {"=Sum([Amount]) < 75000"}>} DISTINCT Platform)
You are awesome.