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

Larger or equal to YearMonth in set analysis

Hey,

This formula works great for getting the RWA value from 6 months back:

Sum(

{<YearMonth={"$(=date(AddMonths(Max({<RWA={"=(Len(RWA)>=0)"}>}YearMonth),-6),'YYYYMM'))"}>}

RWA)

How do I make it fill a chart with all values 6 months back, in other words, what is the syntax for  ">=", the "larger than or equal to" set analysis?

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Try this

Sum(
{<YearMonth={">=$(=Num(date(AddMonths(Max({<CostOfCredit={">0"}>}YearMonth),-12),'YYYYMM')))"
}>}
CostOfCredit)

View solution in original post

10 Replies
Anil_Babu_Samineni

May be this?

Sum({<YearMonth={">=$(=date(AddMonths(Max({<RWA={"=(Len(RWA)>=0)"}>}YearMonth),-6),'YYYYMM')) <=$(=date(Max({<RWA={"=(Len(RWA)>=0)"}>}YearMonth),'YYYYMM'))"}>} RWA)

OR

Sum({<YearMonth={">=$(=date(AddMonths(Max({<RWA={"=(Len(RWA)>=0)"}>}YearMonth),-6),'YYYYMM')) <=$(=date(Max(YearMonth),'YYYYMM'))"}>} RWA)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hiringel
Contributor III
Contributor III
Author

No, it just shows "No data to display"

Anil_Babu_Samineni

Could be format issue, Can you attach sample

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hiringel
Contributor III
Contributor III
Author

Here is a test file that has an example of the challenge

hiringel
Contributor III
Contributor III
Author

Sure, put one as a response to the original question. Thanks!

antoniotiman
Master III
Master III

May be this

Sum(

{<YearMonth={">=$(=date(AddMonths(Max({<RWA={[=(Len(RWA)>=0)]}>}YearMonth),-6),'YYYYMM'))"}>}

RWA)

hiringel
Contributor III
Contributor III
Author

No, I am afraid not, it just shows "No data to display"

I attached a test file above if that helps!

antoniotiman
Master III
Master III

Sum(
{<YearMonth={">=$(=Num(date(AddMonths(Max({<RWA={"=(Len(RWA)>=0)"}>}YearMonth),-12),'YYYYMM')))"}>}
RWA)

hiringel
Contributor III
Contributor III
Author

Hey, that works for RWA! Great!
Do you know how to make it work for the CostOfCredit example as well?