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: 
Anahita
Contributor II
Contributor II

Variables within a formula

Hi

I want to show sales in a time interval. For this, I have 2 input date which user should fill those. ( VStartdate, VEnddate). Then, in a table or heat map sales should be displayed based on parentID(row) and BGId(column), sales((VcurrentRevenue-VPrevRevenue)/VPrevRevenue)*100 (measure)

VcurrentRevenue: sum({FactRevenueOpDate={“>=$(=VStartDate)<=$(=VEndDate)”}>}RevenueAmt)/100000

 

VPervRevenue:

sum({<FactRevenueOpDate={“>=$(=VPrevStartDate)<=$(=VPervEndDate)”}>}RevenueAmt)/10000

VPervStartDate: left(VStartDate,4)-1&right(VStartDate,4)

 

VPervEndDate:

left(VEndDate,4)-1&right(VEndDate,4)

when user choose date and parentID, amount of sales should be calculated for all BGId separately.


sample table that I want to show in the end, is attached. 

 

Labels (3)
1 Reply
Anahita
Contributor II
Contributor II
Author

Sample data is here