Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data in excel as below
Date ID outcome share process
23/03/2014 4242 Failed Fail Fail
I created a straight table to show no of fail wit the below expression
count({<Result={'Failed'}>}Distinct ID)
but in the table it is not showing the ID why because in excel there are two instances as Failed and Fail. Can anyone suggest me please how to change the above expression to include both Failed and Fail. I tried like below but it is not working
count({<Result={'Failed','Fail'}>}Distinct ID)
Thanks.
Where is your Result field as you have explained inyour original post?
This should work if 'Result' is your field and not 'outcome'.
You can also try a search in your set expression:
count({<Result={"Fail*"}>}Distinct ID)
I don't see a field called Result. Perhaps you mean outcome instead: count({<outcome={'Fail*'}>}Distinct ID)
Thanks. The Result is from cross table. actually I used a cross table
TblData:
CrossTable(Test,Result,3)
LOAD
Date
ID ,
Outcome,
[share],
[Process]
FROM
[Report.xlsx]
(ooxml, embedded labels, table is Sheet);
Thanks. tried with outcome but it is showing incorrect values. Do I need to change anything?
Can you upload sample qvw along with xlsx file?
Since you made a cross table, your "Test" column I think will contain "Share" and "Process", and then Result will contain "Fail" or "Failed". So maybe try:
count({<Test = {'Share'}, Result={'Fail*'}>}Distinct ID)
or
count({<Test = {'Process'}, Result={'Fail*'}>}Distinct ID)
I recommend handle this in scripts. Create a bit flag "flg_failed" with value '0' and '1' using apply-map .
1 for failed or fail
0 for anything else
Expression in Chart should be : sum(flg_failed)
Aggregation is faster then Count or set-analysis
-Sarvjeet
Below expression should work,
Count ({<Result={"*Fail*"}>} DISTINCT ID)
You can even align "Fail", "Failed" etc to unique data "Fail" in backend script and use below expression.
Count ({<Result={"Fail"}>} DISTINCT ID)