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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

number of parts with multiple prices with same supplier

Hi All,

        the KIP i need to show is

                      # parts with multiple prices with same supplier 

what i understand is , i need to show number of materials  which is supplied by same supplier having more then one distinct  price and validto has to be greater than today()


Dimension :Supplier

Expression:

aggr(Count({<SCOPE={'Yes'},VALIDTO={">$(=Date(today(),'DD-MM-YYYY'))"},supplier={"=Count(Distinct Price)>1"}>}distinct part),supplier)


i am getting materials , suppliers which has only one  price ,which should not ,so i think  the greater than syntax in my expression

has problem,

any  suggestion plz..

Thanks






1 Solution

Accepted Solutions
sunny_talwar

1) I don't think you need Aggr() in your expression

2) May be try this

Count({<SCOPE = {'Yes'}, VALIDTO = {">$(=Date(today(),'DD-MM-YYYY'))"}, supplier = {"=Count({<SCOPE={'Yes'}, VALIDTO ={"">$(=Date(today(),'DD-MM-YYYY'))""}>} DISTINCT Price)>1"}>} DISTINCT part)

View solution in original post

15 Replies
Chanty4u
MVP
MVP

try below put "= "


aggr(Count({<SCOPE={'Yes'},VALIDTO={">=$(=Date(today(),'DD-MM-YYYY'))"},supplier={"=Count(Distinct Price)>1"}>}distinct part),supplier)


sunny_talwar

1) I don't think you need Aggr() in your expression

2) May be try this

Count({<SCOPE = {'Yes'}, VALIDTO = {">$(=Date(today(),'DD-MM-YYYY'))"}, supplier = {"=Count({<SCOPE={'Yes'}, VALIDTO ={"">$(=Date(today(),'DD-MM-YYYY'))""}>} DISTINCT Price)>1"}>} DISTINCT part)

kunkumnaveen
Specialist
Specialist
Author

thanks for your reply ,

i have used aggr because in different KIP i need to group it with plant wise ,so without using aggr how can i able to group with plant

Count({<SCOPE = {'Yes'}, VALIDTO = {">$(=Date(today(),'DD-MM-YYYY'))"}, supplier = {"=Count({<SCOPE={'Yes'}, VALIDTO ={"">$(=Date(today(),'DD-MM-YYYY'))""}>} DISTINCT Price)>1"}>} DISTINCT<Plant> part)

is above expression a valid one

sunny_talwar

Group by plant? Not sure I understand? can you elaborate?

kunkumnaveen
Specialist
Specialist
Author

i mean for a  particular plant ,supplier combination how many materials has distinct multiple prices supplied by that supplier .

sunny_talwar

Then I believe you will have to use Aggr() function instead of set analysis

kunkumnaveen
Specialist
Specialist
Author

Hello , i have used the below expression which suggested by you

Count({<SCOPE = {'Yes'},MATL_TYPE={'HALB','ROH'}, VALIDTO = {">$(=Date(today(),'DD-MM-YYYY'))"}, [MATERIAL CODE]= {"=Count({<SCOPE={'Yes'},MATL_TYPE={'HALB','ROH'}, VALIDTO ={"">$(=Date(today(),'DD-MM-YYYY'))""}>} DISTINCT PRICE_MAT)>1"}>} DISTINCt [MATERIAL CODE])


before selecting vendor i am getting wrong outputimage2.PNG

after selecting that vendor i am getting correct o/p

image3.PNG

can u suggest me y this is happening

sunny_talwar

Looking at screenshots and expressions doesn't give me much details Naveen. Would you be able to share a sample to dig deeper. Also, it would be helpful to know the expected number you are looking to get with and without selections

kunkumnaveen
Specialist
Specialist
Author

i wish to do so but it is client data which i am not allowed to share ,to keep it simple the number i am getting after selecting vendor (1,2)should appear even if i don't select vendor because they are correct num