Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

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
Gysbert_Wassenaar

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
Specialist
Specialist
Author

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

Dummy.PNG

antoniotiman
Master III
Master III

Maybe like this

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

Regards,

Antonio

rubenmarin

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

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

passionate
Specialist
Specialist

Hi Naveen,

PFA Solution.

Please let me know for issues.

Regards,

Pankaj