
Creator
2021-03-05
05:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to write multiple if conditions
Hi Qlik Users,
I would like to write below nested if condition up to next 120 months.
Can any one suggest me to simplify this logic instead of writing 120 times.
If(MDate=MonthStart(Today()),Sales,
If(MDate=MonthStart(Today(),1),Sales,
If(MDate=MonthStart(Today(),2),Sales,
If(MDate=MonthStart(Today(),3),Sales,
If(MDate=MonthStart(Today(),4),Sales,
If(MDate=MonthStart(Today(),5),Sales,
If(MDate=MonthStart(Today(),6),Sales,
.
.
.
.
If(MDate=MonthStart(Today(),120),Sales,
0
)
))))))))))
528 Views
1 Reply

Specialist
2021-03-05
05:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
pl. provide excel sample data
ksrini
516 Views
