# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for
Search instead for
Did you mean:
Partner

## 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
Master II

Hi,

Please try like this.

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(),

)))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Master

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())))

Partner
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?

Partner
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.

Partner
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.

Master II

Can you attach sample XL data file?

Partner
Author

Hi,

Please find the qvw file attached.

Master II

alknirmal1

How you want to see the data?

How many days you want to show default data?