Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
deeavhad
Contributor
Contributor

count of sum of daily volume more than 500 is more than 5 days in month then highlight the value in heat map

hi , as per subject I need, Sum of item numbers on a given date for only SLA transactions. If the sum is greater than 500 on 5 days in a month, highlight the date 

I am trying following expression but it shows error

=If(count({<[UKI_ES_Opened.autoCalendar.Month]= (Sum({<[SLA] = {'24','48','72'}>} [UKI_ES_Items] )>500)>})>5, 'Red')

 

Please help

 

1 Solution

Accepted Solutions
rubenmarin

Ther is no month with those SLA that meets the requirements, if you add NA and TBD this works:

If(Sum(Aggr(If(Count(distinct TOTAL <UKI_ES_Opened.autoCalendar.YearMonth>
{<[UKI_ES_Opened.autoCalendar.Date]={"=Sum({<[SLA] = {'24','48','72','NA','TBD'}>} [UKI_ES_Items])>500"}>} [UKI_ES_Opened.autoCalendar.Date])>=5,1,0)
,UKI_ES_Opened.autoCalendar.YearMonth,UKI_ES_Opened.autoCalendar.Date)), Red())

View solution in original post

6 Replies
rubenmarin

Hi, you can try with:

If(Sum(Aggr(If(Count(distinct TOTAL <[UKI_ES_Opened.autoCalendar.Month]> {<DateField={"=Sum({<[SLA] = {'24','48','72'} [UKI_ES_Items])>500"},>} DateField)>=5,1,0),[UKI_ES_Opened.autoCalendar.Month],DateField)), Red())

deeavhad
Contributor
Contributor
Author

Hi , I am trying to create HEAT MAP

Dimension 1- UKI_ES_Opened.autoCalendar.YearMonth

Dimension 2- =Day([UKI_ES_Opened.autoCalendar.Date])

Measure = 

sum({$<[UKI_ES_Opened.autoCalendar.Year] = {'$(=year(today()))'},[UKI_ES_Opened.autoCalendar.Month] = {'$(=month((Today())))'},[SLA] = {'24','48','72'}>}UKI_ES_Items)+NullCount({$<[UKI_ES_Opened.autoCalendar.Year] = {'$(=year(today()))'},[UKI_ES_Opened.autoCalendar.Month] = {'$(=month(Today()))'},[SLA] = {'24','48','72'}>}UKI_ES_Items)

in options under appearance

Min scale = 500

Max Scale value- If(Sum(Aggr(If(Count(distinct TOTAL <[UKI_ES_Opened.autoCalendar.Month]> {<[UKI_ES_Opened.autoCalendar.Date]={"=Sum({<[SLA] = {'24','48','72'} [UKI_ES_Items])>500"},>} [UKI_ES_Opened.autoCalendar.Date])>=5,1,0),[UKI_ES_Opened.autoCalendar.Month],UKI_ES_Opened.autoCalendar.Date)), Red())

 

But chart is showing like this, as there is only one entry for above 500 still it highlighting, I need to highlight if on more than or equal to 5 days if sum of items is grater than 500 otherwise it should not highlight

deeavhad_0-1632123290807.png

 

Please Guide

 

 

 

 

 

 

rubenmarin

Hi ,if you are using UKI_ES_Opened.autoCalendar.YearMonth as dimension, use that field instead of [UKI_ES_Opened.autoCalendar.Month], something like:

 If(Sum(Aggr(If(Count(distinct TOTAL <[UKI_ES_Opened.autoCalendar.YearMonth]> {<[UKI_ES_Opened.autoCalendar.Date]={"=Sum({<[SLA] = {'24','48','72'} [UKI_ES_Items])>500"},>} [UKI_ES_Opened.autoCalendar.Date])>=5,1,0),[UKI_ES_Opened.autoCalendar.YearMonth],UKI_ES_Opened.autoCalendar.Date)), Red())

If doent' works it would be great if you can uplaod a sample to make some tests.

You can add fixed data susing inline load just to demonstrate the issue

deeavhad
Contributor
Contributor
Author

Hi I have attached the Data and I need only current month view, so the measure is like above and also guide me where to use the expression provided by you for heat map

rubenmarin

Ther is no month with those SLA that meets the requirements, if you add NA and TBD this works:

If(Sum(Aggr(If(Count(distinct TOTAL <UKI_ES_Opened.autoCalendar.YearMonth>
{<[UKI_ES_Opened.autoCalendar.Date]={"=Sum({<[SLA] = {'24','48','72','NA','TBD'}>} [UKI_ES_Items])>500"}>} [UKI_ES_Opened.autoCalendar.Date])>=5,1,0)
,UKI_ES_Opened.autoCalendar.YearMonth,UKI_ES_Opened.autoCalendar.Date)), Red())

deeavhad
Contributor
Contributor
Author

Hi