Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Lars_Esser
Contributor II
Contributor II

Qlik sense; color by dimension in combination with point in time reporting

Hi all,

I made a simple example data set;

VendorSpendContractDate fromDate to 
A100J01-01-202031-01-2020
A100N01-02-202031-12-9999
B200J01-01-202031-12-9999
C300N01-01-202031-12-9999

 

Based on this data set a want to make a bar chart. 

As the dimension I take the vendor and as meassure i take the sum of spend. 

I made a button to report actual data and a button to pick a date in the past. 

So actual the spend for vendor A = 100 without contract but on, for example, the 15th of januari the spend for vendor is 100 with contract. 

I color the bars by the dimension 'contract'. 

The bar for vendor A is always grey. No matter what date i select.

I want the bar to be yellow in january (contract = J) and red in, for example march (contract =N).

How do i fix this? Please see the attached qvf file. 

Thanks in advance. 

Kind Regards, 

Lars

 

2 Replies
Lisa_P
Employee
Employee

I have managed to do this in my app, but your app has date limitations, so does not show all the data.

vendor.PNG

I first created a Master dimension for Contract and customized the colors to be yellow and red for J and N

Then I added Contract as a second dimension in the chart, made it stacked and colored by the Master dimension Contract.

Lars_Esser
Contributor II
Contributor II
Author

Hi Lisa_P,

Thanks for your reply. In your solution it looks like the spend for vendor A is 200. 

This is not correct. The spend for vendor A is 100. Its just that there is a contract until 31-01-2020 and no contract after that date. 

So depending no matter what date i select in my app, the spend for vendor A must Always be 100. 

De color of vendor A should switch depending on the date selected in my app.