Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Highlight histogram

Hi, everyone,

I'm a beginner on qlikview. I want to highlight the max values of each year on my histogram

My dimension is "MONTH_ID" varying from 01/01/2010 to 01/12/2013, and my expression is "sum(MONTHLY_FEE)", I have tried this expression on the backgroud color :

if (sum(MONTHLY_FEE)=Max(TOTAL {$<MONTH_ID={"=DATE('01/01/'&[YEAR],'DD/MM/YYYY')<=DATE(MONTH_ID,'DD/MM/YYYY') AND DATE('01/12/'&[YEAR],'DD/MM/YYYY')>=DATE(MONTH_ID,'DD/MM/YYYY')"}>} AGGR(Sum(MONTHLY_FEE),MONTH_ID)),RGB(0,255,0),RGB(255,0,0))

But this expression will only highlight the highest value of all the months, it seems that the condition :

{$<MONTH_ID={"=DATE('01/01/'&[YEAR],'DD/MM/YYYY')<=DATE(MONTH_ID,'DD/MM/YYYY') AND DATE('01/12/'&[YEAR],'DD/MM/YYYY')>=DATE(MONTH_ID,'DD/MM/YYYY')"}>}

is not correctly written, do you guys have any idea?

Regards,

Xu

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw for a simplified example using the rank function to determine the maximum value of a sum expression over a dimension.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

See attached qvw for a simplified example using the rank function to determine the maximum value of a sum expression over a dimension.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi, Gysbert,

Thanks for you sample, the function rank works well, I have found another solution by using the expression :

if

(Somme=AGGR(NODISTINCT Max(AGGR(Sum(MONTHLY_FEE),MONTH_ID)),Year_Of_Month),RGB(50,255,50),if(Somme=AGGR(NODISTINCT Min(AGGR(Sum(MONTHLY_FEE),MONTH_ID)),Year_Of_Month),RGB(255,50,50),RGB(150,150,150)))

Regards,

Xu

Not applicable
Author

I have a question - how do you create a histogram in QV?

Not applicable
Author

Hi,

It's just a simple option after creating a graph in QV. You can enter the propoerties pages of the graph by right clicking on the graph. You won't miss it.

Regards,

Xu