5 Replies Latest reply: Aug 12, 2017 1:12 PM by pankaj thakur

# 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

• ###### 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)

• ###### 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

• ###### Re: how to write calculate dimension

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

• ###### 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 Naveen,

PFA Solution.

Please let me know for issues.

Regards,

Pankaj