Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
BeesKnees
Contributor
Contributor

Conditional Formatting in Qlik Sense

I am trying to do conditional formatting to my measure heavy dashboard.

I have the following script that is not working for conditional formatting

if((sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, QtyInvoiced))+Sum(If(YM=MaxYM,Qty_Allocated)))
/
sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, Forecast_Cases))<.75,Red)

 

I am now stuck with a nested expression

Please assist

1 Solution

Accepted Solutions
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Check out for output of an expression in the straight table.

 

Try below

if((sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, QtyInvoiced))+Sum(If(YM=MaxYM,Qty_Allocated)))
/
sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, Forecast_Cases))<0.75,Red()).

 

I would also suggest you to use set analysis in expression.

Thanks,

Ashutosh

View solution in original post

2 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Check out for output of an expression in the straight table.

 

Try below

if((sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, QtyInvoiced))+Sum(If(YM=MaxYM,Qty_Allocated)))
/
sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, Forecast_Cases))<0.75,Red()).

 

I would also suggest you to use set analysis in expression.

Thanks,

Ashutosh

BeesKnees
Contributor
Contributor
Author

Thank you. The problem comes in at the next step

 

if((sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, QtyInvoiced))+Sum(If(YM=MaxYM,Qty_Allocated)))
/
sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, Forecast_Cases))<0.75,Red()),

if(((sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, QtyInvoiced))+Sum(If(YM=MaxYM,Qty_Allocated)))
/
sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, Forecast_Cases))>.79) and if((sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, QtyInvoiced))+Sum(If(YM=MaxYM,Qty_Allocated)))
/
sum(If([Fin Year]=[Current Fin Year] and PeriodNo=CurrentPeriodNo, Forecast_Cases))<0.94999, Green()))

 

I also have to set a blue format for values between .95 to 10