Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i want to acheive the following layout in qliksense.
there are two date filters : Period 1 and Period 2 . The user selects the respective periods and the data should be populated as below. how to achieve this?
Spend | Revenue | |
Period 1 - 1/1/2020 - 1/8/2020 | 100 | 500 |
Period 2 - 1/9/2020 - 1/16/2020 | 150 | 700 |
Difference % | 50% | 40% |
Hi,
Create Inline load in the editor with 3 value like:
Load * inline [
Dimension_Field
Period1
Period2
Difference];
then create 4 variable in front end which specify the date range(vDate1Start, vDate1End,vDate2Start,vDate2End)
In the chart add calculated dimension and measure as below
Dimension:
pick(Match(Dimension_Field,'Period1','Period2','Difference'),
'Period1 -'&'$(vDate1Start)'& ' - '& $(vDate1End),
'Period2 -'&'$(vDate2Start)'& ' - '& $(vDate2End),
Difference)
Measure:
pick(Match(Dimension_Field,'Period1','Period2','Difference'),
Sum({<Date={">=$(vDate1Start)<=$(vDate1End)"}>}Measure_Field),
Sum({<Date={">=$(vDate2Start)<=$(vDate2End)"}>}Measure_Field),
Sum({<Date={">=$(vDate1Start)<=$(vDate1End)"}>}Measure_Field)
-Sum({<Date={">=$(vDate2Start)<=$(vDate2End)"}>}Measure_Field)
)
Let me know if this works or require any other details.