Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator III
Creator III

Add Cost in the last Month

I have Price Per Month being calculated in the QVW. 

 

 

How do I add $100 in the last month of every ID? For instance,  ID 2, for 5/1/2020, I need to add $100 to PricePerMonth and show it as $110

1 Solution

Accepted Solutions
rubenmarin

Hi, it may be different based on what dimensions the table will have.

In example, for a table with Id and Month as dimensions: If(Month=Max(TOTAL <ID> Month), PricePerMonth+100, PricePerMonth).

In a table with only ID as dimensiones this expression is possible: Max(Aggr(If(Month=Max(TOTAL <ID> Month), PricePerMonth+100, PricePerMonth), ID, Month))

View solution in original post

3 Replies
tresesco
MVP
MVP

Assuming you are looking for a UI solution, try like:

If(Month=Max(total <ID>Month), Sum(PricePerMonth)+100,Sum(PricePerMonth))

Capture.PNG

rubenmarin

Hi, it may be different based on what dimensions the table will have.

In example, for a table with Id and Month as dimensions: If(Month=Max(TOTAL <ID> Month), PricePerMonth+100, PricePerMonth).

In a table with only ID as dimensiones this expression is possible: Max(Aggr(If(Month=Max(TOTAL <ID> Month), PricePerMonth+100, PricePerMonth), ID, Month))

qlikwiz123
Creator III
Creator III
Author

@rubenmarin @tresesco 

 

Thank you so much