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

Expression

Hi Experts,

I have a table of data. I wanted to write expression if my current month has no data means then i need to disaplay my previous month data in that place. I wrote expression like this,

if(isnull(month),-1) but it is not working.

I am new to both qlikview as well this expression thing pls help me.

Note: Only if the data is null it should get the previous month data not if data is there.

Thanks in advance

Regards,

Dhana R

4 Replies
kevinalvino
Partner - Creator
Partner - Creator

Hi Dhana,

I think the one you should check for Null is not the Month , but The result of the expression.

if(IsNull(YourCalculationHere), (Insert Expression of The Previous Month, Your Month in this set Analysis should resulting Month-1), ( Insert YourCalculationHere ))

It should be roughly like that.

Best Regards,

Kevin

YoussefBelloum
Champion
Champion

Hi,

can you attach a screen shot to the your table columns ?

karthikoffi27se
Creator III
Creator III

Hi Dhana,

Try using the below expression

=If(IsNull(month),Addmonths(month,-1), month)

This should give you previous month value.

Many Thanks

Karthik

bramkn
Partner - Specialist
Partner - Specialist

It is unclear how your data is structured. Month(max(Date)) will give you the maximum month available. If your calendar stops at the max date of data this might be helpful for you.


Edit made to make it work in jan as well