Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
alex3049
Partner - Contributor
Partner - Contributor

Get the right unit price to calculate with selection

Hi,

I have to calculate a cost, where I want to use the UNIT PRICE of the minus selection of TIME made by user.

TIMEUNIT PRICEQUANTITYCUSTOMERARTCOST (QUANTITY * UNIT PRICE)
2020113546AA11638
2021013,84550AA12112
2021034555AA12220
20210254XA220
202103612XA272

 

1/ If user select TIME between 202011 and 202103, I want to use the UNIT_PRICE 3 for ART A1 and the UNIT_PRICE 5 for ART A2, because it's the price of the minus periode of selection

TIMEUNIT PRICEQUANTITYCUSTOMERARTPRICE FOR COMPUTECOST
2020113546AA131638
2021013,84550AA131650
2021034555AA131665
20210254XA2520
202103612XA2560

 

2/ If user select TIME between 202102 and 202103, I want to use the PRICE_PER_ART 3 for ART A1 and the PRICE_PER_ART 5 for ART A2, because it's the price of the minus periode of selection

TIMEUNIT PRICEQUANTITYCUSTOMERARTPRICE FOR COMPUTECOST
2021034546AA142184
20210254XA2520
202103612XA2560

 

Finaly, In my app, I don't want to display the ART LEVEL, I just want to diplay customer, cost

1/

CUSTOMERCOST
A4953
X80

 

2/

CUSTOMERCOST
A2184
X80

 

How can I have retrieve in my set analysis, the UNIT_PRICE of the minus selection for every ART?

 

Thanks for the help

1 Reply
dwforest
Specialist II
Specialist II

Create a Master Calendar and then connect to your TIME field.

Selections made on the Master Calendar Year and Month fields would limit the output to only those within the selection