Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

himanshi
New Contributor III

calculation based on variable for pivot

Hi Community,

  I have a requirement to get the calculation of a expression based on min and max date variable excluding date selection. please help.

Regards.

2 Solutions

Accepted Solutions
balrajahlawat
Esteemed Contributor

Re: calculation based on variable for pivot

try like this?

=count(<DateField={"$(= '>=' & date(startdate Variable) & '<=' & date(enddate Variable))"}>} distinct customer)

Highlighted
himanshi
New Contributor III

Re: calculation based on variable for pivot

HI Sunny AND Balraj,

Thanks for the reply this is done.

i have used this for min date : sum({$<[DATE Field] = {"<=$(=vmin)"}>} Inventory)

          and for max date:  sum({$<[DATE Field] = {">=$(=vmax)"}>} Inventory)

Regards,

Himanshi

3 Replies

Re: calculation based on variable for pivot

May be something like this:

=Sum({<Date = {"$(='>=' & Date(vStart) & '<=' & Date(vEnd))"}>}Sales)


Capture.PNG

balrajahlawat
Esteemed Contributor

Re: calculation based on variable for pivot

try like this?

=count(<DateField={"$(= '>=' & date(startdate Variable) & '<=' & date(enddate Variable))"}>} distinct customer)

Highlighted
himanshi
New Contributor III

Re: calculation based on variable for pivot

HI Sunny AND Balraj,

Thanks for the reply this is done.

i have used this for min date : sum({$<[DATE Field] = {"<=$(=vmin)"}>} Inventory)

          and for max date:  sum({$<[DATE Field] = {">=$(=vmax)"}>} Inventory)

Regards,

Himanshi