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 the row of the last payment

Hi,

I am using a straight table which has "day of month" as my dimension and 6 expressions for the payments in the last 6 months (i.e. there is an expression for each of the months). I need to highlight the row where the last payment was received for the current month. In other words, if the last payment was received on the 13th, then this entire row must be highlighted accross all the months.

Any suggestions on how to do this?

Thanks in advance.

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If this code returns the correct day (adapt fieldnames as required):

Max({<Month = {'$(=Max(Month))'}>} If(Aggr(Count(Payments), DayOfMonth, Month) > 0, DayOfMonth))

Then use this condition in the Text Format option for each expression (click the + next to the expression to see the options):

If(Max....)) = DayOfMonth, '<B>')

Or in the Text Color option:

If(Max...)) = DayOfMonth, Red())

Hope this helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks for the quick reply.

I have tried it but can't get it right.

This is what I have:

Dimension: Day Of Month,

Current month expression: sum(if([OverallMonth (Cal)] = vMaxSelectOverallMonthCalCurrent , [Pmt Value]))

So I editted what you gave me and came up with:

Max({<sum(if([OverallMonth (Cal)] = vMaxSelectOverallMonthCalCurrent , [Pmt Value])) = {'$(=Max(sum(if([OverallMonth (Cal)] = vMaxSelectOverallMonthCalCurrent, [Pmt Value]))))'}>} If(Aggr(Count([Pmt Value]), Day Of Month, sum(if([OverallMonth (Cal)] = vMaxSelectOverallMonthCalCurrent, [Pmt Value]))) > 0, Day Of Month))

I added this as an expression to see what the result was but get none. Where have I gone wrong?

Not applicable
Author

I managed to do it in a slightly different way but you pushed me in the right direction.  Thanks.