Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
prashantsanchet
Creator
Creator

Qlik set analysis

Hi Team,

Scenario:


  • One business date will be always selected
  • For that business date we are adding ITDSales value for Business Date= Last Year Last date + YTDSales value for current business date
  • I have plotted this with one bar chart having customer as dimension and measure as following. :

Total ITDSales  =

if( Sum([Discount])>=1000,


num(Sum({$<BusinessDate={'$(=date(yearend([BusinessDate],-1), 'MM/DD/YYYY'))'}>}[ITDSales]) + sum([YTDSales]),'#,##0')


)

  • I  want to count the only customer where Discount is greater  than 1000. for above measure in chart
  • I am writing below expression but i am not getting exact count .

Total Customer Count

Count({<[Customer] ={"=Sum([Discount])>=1000"} >} distinct Customer)


Could you please help on same



6 Replies
aunahsan
Partner - Contributor III
Partner - Contributor III

Count({<[Discount]={'>=1000'} >} distinct Customer)


The above expression is working for me, can you give it a go?

prashantsanchet
Creator
Creator
Author

Hi,

My expression need to be like this only because i do have customer having multiple discount amount and hence inner expression need to be like this

Count({<[Customer] ={"=Sum([Discount])>=1000"} >} distinct Customer)

sunny_talwar

What are you getting and what do you expect to get? Expression's syntax looks right, but difficult to say what might be wrong without having more details

prashantsanchet
Creator
Creator
Author

  • One business date will be always selected
  • For that business date we are adding ITDSales value for Business Date= Last Year Last date + YTDSales value for current business date
  • I have plotted this with one bar chart having customer as dimension and measure as following. :

Total ITDSales  = if( Sum([Discount])>=1000,
num(Sum({$<BusinessDate={'$(=date(yearend([BusinessDate],-1), 'MM/DD/YYYY'))'}>}[ITDSales]) + sum([YTDSales]),'#,##0')
)

  • I am counting the rows after export and  i want to show the Count in KPI
  • I am writing below expression but i am not getting exact count . It is showing count of all the customer . It is not showing count the only customer where Discount is greater  than 1000.

Total Customer Count

Count({<[Customer] ={"=Sum([Discount])>=1000"} >} distinct Customer)


I


sunny_talwar

May be try this

Count(Aggr(If(Sum([Discount]) >= 1000, Sum({$<BusinessDate = {'$(=Date(YearEnd([BusinessDate],-1), 'MM/DD/YYYY'))'}>} [ITDSales]) + Sum([YTDSales])), Customer))

sasiparupudi1
Master III
Master III

may be try

Count({<[Customer] ={"=Aggr(Sum([Discount]),[Customer])>=1000"} >} distinct Customer)