Exclude Value form Dimension - qlikview

I have this set analysis sentence:
=if(aggr(Rank(Count(WordCounter)),Word)<=70,Word)
I have a request to remove "Among" from the Word data.
Any suggestion?

This is the solution optimal:
=if(aggr(Rank(Count {<Word-={'Among'}>}(WordCounter)),Word)<=70,Word)

Try :
=if(aggr(Rank(Count(WordCounter)),if(Word <> 'Among', Word))<=70,Word)

Related

show all unique value from column

I try to show all value from a dataframe column with this code combinaison_df['coalesce'].unique()
but I got this result :
array([1.12440191, 0.54054054, 0.67510549, ..., 1.011378 , 1.39026812,
1.99637024])
I need to see all the values. Do you have an idea to do?
Thanks
If I have this situation but don't want to change it for every print() statement I found this solution with a context manager quite handy:
with pd.option_context('display.max_rows', None):
print(combinaison_df['coalesce'].unique())

Adding a number to a column with a value in it Access

Ok So I have A column with a count IIF expressions As shown:
UNTESTED: Count(IIf([TEST]="UNTESTED",1))
What I want to do is now look at where the location was and when the test was done and if in a specific location and YEAR then add 8 to that value I am now trying to use:
UNTESTED: Count(IIf([TEST]="UNTESTED",1)) AND IIf([REGION]="CANADA" And [YEAR]<=2012,[UNTESTED]+8,[UNTESTED])
Thanks in advance if you can solve this!
Here is the Answer to my question, I solved it :
IIf([Site]="CANADA" Or [Site]="ALASKA",IIf([Year]<"2013",Count(IIf([Pass_Fail]="UNTESTED",1))+8,
Count(IIf([Pass_Fail]="UNTESTED",1))),Count(IIf([Pass_Fail]="UNTESTED",1)))

How do I output a list of data in a specific order?

Using Rails, I'm trying to display all of the 'fragments' in a given 'chapter', in the order of the 'print order' assigned to each fragment.
Here's what I'm using:
#chapter.fragments.order("printorder").each do |fragment|
And yes, this is all very, very new to me. :)
Thanks for your help!
Something like this? I'm not sure what print order is.
#fragments = #chapter.fragments.order("printorder desc")
#fragments.each do |fragment|

How can I use "Expression.Not" with text field?

How can I use "Expression.Not" with text field?
I need to select all records from NHQuestionCount except "ktest"
for example this code return runtime error
NHQuestionCount[] stats = NHQuestionCount.FindAll(Order.Asc("NameFull"), Expression.Not(Expression.Eq("NameFull", "ktest")));
I can't comment on the rest of your code, but your use of Expression is exactly right.

"Field 'COUNT(id)' has no dataset" TSQLQuery in Delphi

Sorry for my english, but i hope you'll understand me :P
I'm trying to create new TSQLQuery component in code, without placing it on form. I wrote that code:
var
sql:tsqlquery;
pole:TFMTBCDField;
....
sql:=tsqlquery.Create(self);
sql.SQLConnection:=ddm.konekszyn;
sql.SQL.Text:='SELECT COUNT(idrap) FROM raporty WHERE idkier="'+lvkierowcy.Selected.Caption+'";';
pole:=TFMTBCDField.Create(self);
pole.Name:='sqlilerap';
pole.FieldName:='COUNT(idrap)';
pole.FieldKind:=fkData;
pole.DisplayLabel:='COUNT(idrap)';
sql.Fields.Add(pole);
sql.Open;
showmessage(sql.FieldByName('COUNT(idrap)').AsString);
sql.Free;
pole.Free;
but i'm getting exception when i try to access data:
First chance exception at $75999617. Exception class EDatabaseError with message 'Field 'COUNT(idrap)' has no dataset'. Process htstrm2.exe (2308)
What should I do ?
Don't even make a field. Queries such as this return one and only one field. So just reference from the fields array:
var
sql:tsqlquery;
....
sql:=tsqlquery.Create(self);
sql.SQLConnection:=ddm.konekszyn;
sql.SQL.Text:='SELECT COUNT(idrap) FROM raporty WHERE idkier="'+lvkierowcy.Selected.Caption+'";';
sql.Open;
showmessage(sql.fields[0].AsString);
sql.Free;
Your database driver reports the empty field name for the aggregate expression.
Alias your field:
sql:=tsqlquery.Create(self);
sql.SQLConnection:=ddm.konekszyn;
sql.SQL.Text:='SELECT COUNT(idrap) AS cnt FROM raporty WHERE idkier="'+lvkierowcy.Selected.Caption+'";';
pole:=TFMTBCDField.Create(self);
pole.Name:='sqlilerap';
pole.FieldName:='cnt';
pole.FieldKind:=fkData;
pole.DisplayLabel:='cnt';
sql.Fields.Add(pole);
sql.Open;
showmessage(sql.FieldByName('cnt').AsString);
sql.Free;
pole.Free;
You must explicitly assign the dataset to the field, try adding this line
pole.DataSet:=sql;
Bye.
Alias the column being returned. You can then access it by that aliased name:
sql.SQL.Text:='SELECT COUNT(idrap) AS iDrapCount FROM raporty WHERE dkier
="'+lvkierowcy.Selected.Caption+'";';
....
pole.FieldName := 'iDrapCount';
Try adding this line to your query:
AND idrap <> nil