Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
alknirmal1
Partner - Contributor III
Partner - Contributor III

Condional formatting - with calculated dimension

Hi ,

I have a calculated dimension to calculate the age buckets for claims with respect to toddy's date in a block chart.

Calculated Dimension :

=IF((Today()-[Claim Received Date])>=-45 and (Today()-[Claim Received Date])<-15  ,'-45 to -15',

IF((Today()-[Claim Received Date])>=-14 and (Today()-[Claim Received Date])<-1  ,'-14 to -1',

IF((Today()-[Claim Received Date])>=0 and (Today()-[Claim Received Date])<=45  ,'0-45',

)))

Expression :

Count(Claim Number)

I have requirement of coloring the block chart with the below colors for each range.

0-45

Green

-14 to -1

Blue

-45 to -15

yellow

How can I achieve this requirement.?

I tried putting a background expression in the expression and its not working. What is the right way of doing  it ?

Appreciate your help on this.

Thanks

NV

10 Replies
qlikviewwizard
Master II
Master II

Hi,

Please try like this.

Capture1.PNG

Capture.PNG

Anil_Babu_Samineni

Why can't you use same for BG color of that calculated dimension.

=IF((Today()-[Claim Received Date])>=-45 and (Today()-[Claim Received Date])<-15  ,Yellow(),

IF((Today()-[Claim Received Date])>=-14 and (Today()-[Claim Received Date])<-1  ,Blue(),

IF((Today()-[Claim Received Date])>=0 and (Today()-[Claim Received Date])<=45  ,Green(),

)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
balabhaskarqlik

You're already using: Calculated Dimension,

and Expression is: Count([Claim Number]),

Then in expression, for the Background:

Use the below expression, to format colors:

=IF(Count([Claim Number])>=0 and Count([Claim Number])<=45,Green(),

    IF(Count([Claim Number])>=-14 and Count([Claim Number])<=-1,Blue(),

      IF(Count([Claim Number])>=-45 and Count([Claim Number])<=-15,Yellow())))

alknirmal1
Partner - Contributor III
Partner - Contributor III
Author

Thanks for your response. This method is correct .

However, in my case, the dashboard refresh is on a weekly basis and user want to see this calculation dynamically with respect to the current date.

so moving the calculation to script level is not an option here. Any other thoughts  please?

alknirmal1
Partner - Contributor III
Partner - Contributor III
Author

Thank for your response. I tried this and its not giving the expected result. all the values are highlighted in green color when i am using this.

alknirmal1
Partner - Contributor III
Partner - Contributor III
Author

Thank for your response. I tried this and its not giving the expected result. all the values are highlighted in green color when i am using this.

MK9885
Master II
Master II

Can you attach sample XL data file?

alknirmal1
Partner - Contributor III
Partner - Contributor III
Author

Hi,

Please find the qvw file attached.

qlikviewwizard
Master II
Master II

alknirmal1

How you want to see the data?

How many days you want to show default data?