Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Issues

Hello,

I want to create an expression to count my data with a "where" clause like:

SELECT

     COUNT(*)

FROM

     TABLE1

WHERE

     MONTH_START != MONTH_END;

But the following expression doesn't work: =COUNT( {< month_start != month_end >} my_id)

Can anyone help me?

6 Replies
giakoum
Partner - Master II
Partner - Master II

you will need either Only or the p function :

month_start={"$(=only(month_end))"}


or


month_start=p(month_end)


update (just noticed the !=):

month_start -={"$(=only(month_end))"}


month_start=e(month_end)

its_anandrjs
Champion III
Champion III

After loading data from SQL table make a QVD and then load data from QVD. When loading data from QVD check where condition like

load

CountField

From  Location

Where MONTH_START <> MONTH_END;

Hope this helps

Not applicable
Author

i've tried something like that, but it doesn't worked:

=COUNT({< MES-={"$(=only(MES_TER))"}>} CDCHAMADO)

=COUNT({< MES=e(MES_TER)>} CDCHAMADO)

am i doing something wrong?

Not applicable
Author

thks, but i need it on the chart expression!

giakoum
Partner - Master II
Partner - Master II

Sample app?

Not applicable
Author

A sample with a qvd file