Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kunkumnaveen
Contributor III

how to write calculate dimension

Hi All,

       How to write a calculated dimension ,so that to display only those parts which has more then one price and whose date is greater than today for selected supplier

from sample data as below

part      supplier        price       date

001        xxx             100       01-05-2017

001        xxx             200       16-08-2017

001        xxx             300       31-12-2020

002        xxx             100       16-08-2017

002        xxx             50        22-09-2017

003        xxx             20        21-10-2017

006        yyy            100        24-10-2017

006        yyy             30         03-11-2017

if i select supplier xxx then i need to display this in  normal table

part       price

001          200

001          300

002          100

002           50

003 part shouldn't come because it has only one price even the date condition is valid

5 Replies

Re: how to write calculate dimension

Perhaps with part as dimension and this expression:

sum({<date={">$(=date(today()))"},part={'=count({<date={">$(=date(today()))'}>}distinct date)>1"}>}price)


talk is cheap, supply exceeds demand
kunkumnaveen
Contributor III

Re: how to write calculate dimension

thanks for ur reply ,i tried ur expression ,but some how i am getting null values as o/p

Dummy.PNG

antoniotiman
Honored Contributor III

Re: how to write calculate dimension

Maybe like this

and don't forget to check 'Suppress when Null Value'.

Regards,

Antonio

Re: how to write calculate dimension

Hi, maybe with an equal sign in $-expansion:

sum({<date={">$(=date(today()))"},part={'=count({<date={">$(=date(today()))'}>}distinct date)>1"}>}price)

passionate
Valued Contributor

Re: how to write calculate dimension

Hi Naveen,

PFA Solution.

Please let me know for issues.

Regards,

Pankaj

Community Browser