Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

how to write expression

Hi all,

i need to show only those plant and suppliers whose terms are more then 1

plant      supplier         terms( expression i wrote is  count distinct terms)

xxx          aaa                  4

yyy            bbb                  3

zzz           ccc                     2

kkk           ddd                    1

hhh           eee                    1

but what i need to display is only those terms >1

plant      supplier         terms

xxx          aaa                  4

yyy            bbb                  3

zzz           ccc                     2

how to achieve this plz

thanks

11 Replies
Anil_Babu_Samineni

May be this?

Count({<terms = {"=Count(DISTINCT terms) > 1"}>} DISTINCT terms)

Or simply

Count({<terms = {">1"}>}DISTINCT terms)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Try like:

If( your count expression >1, your count expression)

Then enable null suppression as well.

prma7799
Master III
Master III

Count({<terms = {'>1'}>}DISTINCT terms)

prieper
Master II
Master II

You may restrict the view in a table with an expression like

IF(terms > 1, terms)

terms might be replaced by an aggregation, in case need.

You may also restrict your data in the dimension, e.g.

IF(terms > 1, supplier)

Peter

kunkumnaveen
Specialist
Specialist
Author

hi ,i am getting zero ,where did i went wrong

count({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'},[Delivery Term]={">1"}>}distinct [Delivery Term])

kunkumnaveen
Specialist
Specialist
Author

hi ,i am getting zero ,where did i went wrong

count({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'},[Delivery Term]={">1"}>}distinct [Delivery Term])

tresesco
MVP
MVP

May be this ?

If(

count({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'}>} distinct [Delivery Term]) >1,

count({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'}>} distinct [Delivery Term])

     )


prma7799
Master III
Master III

Check your SCOPE field value whether it is in upper format or lower

or try like MATL_TYPE={"HALB","ROH"}

kunkumnaveen
Specialist
Specialist
Author

Hi i have used the above expression ,how to remove these rows

Capture.PNG