Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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






15 Replies
sunny_talwar

With or without selection you want to get 1, 2?

kunkumnaveen
Specialist
Specialist
Author

do i need to  put vendor in the expression ?because what i think is after selecting vendor i am getting correct o/p which mean i need to filter expression with vendor ,do i need to do  group by vendor ?

kunkumnaveen
Specialist
Specialist
Author

it should not change before and after selection

sunny_talwar

Not sure, but try this

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

kunkumnaveen
Specialist
Specialist
Author

i known u gona hate me today ,i tried ur expression it is working thanks,but same expression i have used by changing material code to price ,then i am getting zero

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

i should get Distinct Price =2

Image 12.PNG

sunny_talwar

Try this

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