Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have below data to work on to get total demand and supply for every year.
The calculation for each year will be based on previous year. Then, within it as well to get demand there is a formula to apply with the same rule.
I know for this, we need to use Peek() function..however, i am not able to come out with it if need to do grouping,
Attached is the file together with the formula.
Formula:
The calculation will be group by Position to get total demand and supply for each year.
Notes: (CY)= CurrentYear, (PY)=PreviousYear
1. Filled position (CY)= Total demand (PY)
2. Retain = Filled position (CY)- Retire TBF (CY) - Retire NTBF (CY) - Retire Delimit (CY)
3. Vacant (Previous Year) = Retire NTBF (CY) + Vacant NTBF (CY)
4. Total Demand =Filled position (CY) + Retire TBF (CY) + Vacant TBF
5. Total Supply = Retain (CY)
Thanks for any help!
Is columns A-D input data that you don't have to calculate in Qlik? Do you want a solution that is calculated in the script or is it ok to calculate in measures in charts and tables? How do you want the final report to work? Should it be shown as a table with position and year + measures, or should it be possible to aggregate for example Retain for all positions? All years?
You can solve it in the script like
Hi Morgan,
Thanks for your help!
It works for 2025, however, how do i use Peek() for the rest of the year using the previous year data?
Do you mean to get Total Demand (calculation 4) for 2025 into Filled position for 2026?
1. Filled position (CY)= Total demand (PY)
Hi Morgan,
Many thanks for your help.. I really appreciate it..
For the calculation..we need to calculate for 2025 first..then using calculated data for 2025, we need to calculate for 2026.
For example..we need to calculate Total Demand for 2025, then we will need to use Total Demand for 2025 as a Filled position for 2026..
This is where I still stuck..hope you can help me 🙂
Thanks in advaced :):)