Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
el_lloydie
Creator
Creator

Expression Help

Hi guys

A bit of help needed if I may call on your assistance please?

I am trying to work out a score for the previous FY.

The below works for the current financial year (as an additional request, how do I get this to always to the current year using "Year(Today())")?

( Count({<[FTMR_P2P_KPI]={"Success"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

/

( Count({<[FTMR_P2P_KPI]={"Success","Failure"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

For the previous financial year, I guess I would need the above (once it's mastered to always be at the current year depending on today's date no matter what Year I select on my app) amending to include "Year(Today())-1"?

Many thanks for your help in advance!

Gareth

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps something like this:

( Count({<MyYearField={$(=Year(Today()))}, [FTMR_P2P_KPI]={"Success"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

/

( Count({<MyYearField={$(=Year(Today()))}, [FTMR_P2P_KPI]={"Success","Failure"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

Previous year:

( Count({<MyYearField={$(=Year(Today())-1)}, [FTMR_P2P_KPI]={"Success"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

/

( Count({<MyYearField={$(=Year(Today())-1)}, [FTMR_P2P_KPI]={"Success","Failure"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Perhaps something like this:

( Count({<MyYearField={$(=Year(Today()))}, [FTMR_P2P_KPI]={"Success"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

/

( Count({<MyYearField={$(=Year(Today()))}, [FTMR_P2P_KPI]={"Success","Failure"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

Previous year:

( Count({<MyYearField={$(=Year(Today())-1)}, [FTMR_P2P_KPI]={"Success"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))

/

( Count({<MyYearField={$(=Year(Today())-1)}, [FTMR_P2P_KPI]={"Success","Failure"},[Purchase Order Document Type - Code]-={''}>} DISTINCT [Invoice Number]))


talk is cheap, supply exceeds demand

View solution in original post

el_lloydie
Creator
Creator

Thank you very much Gysbert, that worked like an absolute dream.

Thanks again.

Gareth