Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Solving the Informatica Dilemma: On-Demand Briefing - Watch On Demand!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Year to month Stutus Update issue


Hi,

I have fields like CustID ,year , month and status  .status field contains every year status update of CustId if I click on CustID the status of that custuid will be displayed with currentYear .If any custID has no satus in this year(means only 2015) it will display last year status(ie 2014) ,in prev year also no status update for that custID it will display 'NO Status'.in every year status will be updated on June month .Can any one please help me how to write a expression for this.

Thanks in Advance.

4 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi

Try this expression

=Alt(Only({<Year={$(=Year(Today()))}>} Status), Only({<Year={$(=Year(YearStart(Today(), -1)))}>} Status), 'No Status')

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

Thankyou jagan,

But every year june status will be updated so we have to write condition for that.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you attach sample data and your expected output?  It would be easier to understand and give solution easily.

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Create a variable like below

vCurrentStatusYear = If(Today() >= MakeDate(Year(Today()), 6), Year(Today()), Year(Today()) - 1)

=Alt(Only({<Year={$(=vCurrentStatusYear)}>} Status), 'No Status')


Hope this helps you.


Regards,

Jagan.