Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

prashantsanchet
Contributor

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
New Contributor III

Re: Qlik set analysis

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


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

prashantsanchet
Contributor

Re: Qlik set analysis

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)

MVP
MVP

Re: Qlik set analysis

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
Contributor

Re: Qlik set analysis

  • 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


MVP
MVP

Re: Qlik set analysis

May be try this

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

sasiparupudi1
Honored Contributor III

Re: Qlik set analysis

may be try

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

Community Browser