# New to QlikView

Discussion board where members can get started with QlikView.

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
Esteemed Contributor

## Re: calculation based on variable for pivot

try like this?

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

Highlighted
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
MVP

## Re: calculation based on variable for pivot

May be something like this:

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

Esteemed Contributor

## Re: calculation based on variable for pivot

try like this?

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

Highlighted
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