Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two tables, Table1 and Table2 as Follows,
Table1:
ID | PNAME | MANAGER | REQUIRED |
1 | PR1 | RAM | 3 |
2 | PR2 | RAVI | 4 |
3 | PR3 | RAJ | 2.5 |
4 | PR4 | SEKHAR | 5 |
5 | PR5 | MOHAN | 6 |
Table2:
ID | PNAME | MANAGER | RESOURCE NAME | PROVIDED |
1 | PR1 | RAM | FEDRICK | 1 |
1 | PR1 | RAM | AJAY | 1.5 |
2 | PR2 | RAVI | JOHN | 2 |
2 | PR2 | RAVI | ALLEN | 1.5 |
3 | PR3 | RAJ | RAMU | 1 |
3 | PR3 | RAJ | SELVA | 1 |
4 | PR4 | SEKHAR | RAMANA | 1.5 |
4 | PR4 | SEKHAR | BHASKAR | 2.5 |
5 | PR5 | MOHAN | GANESH | 2.6 |
5 | PR5 | MOHAN | PRAVEEN | 3.4 |
My Requirement is as Follows,
DIFF=PROVIDED-REQUIRED (For example, Manager RAM has two Resources FEDRICK and AJAY, For 'FEDRICK' PROVIDED value is 1 and for 'AJAY' is 1.5. I want to sum those values(2.5) and subtract them from REQUIRED Value(3), then DIFF is 0.5)
Output Required:
ID | PNAME | MANAGER | RESOURCE NAME | DIFF(PROVIDED-REQUIRED) |
1 | PR1 | RAM | FEDRICK | 0.5 |
AJAY | ||||
2 | PR2 | RAVI | JOHN | 0.5 |
ALLEN | ||||
3 | PR3 | RAJ | RAMU | 0 |
SELVA | ||||
4 | PR4 | SEKHAR | RAMANA | 1 |
BHASKAR | ||||
5 | PR5 | MOHAN | GANESH | 0 |
PRAVEEN |
I'm new to QLIKVIEW and i tried this my level best, But i didn't get exact output.
Experts Please Can anyone have a look into this and give me suggestion.
I'm attached my sample QVW also, Please provide solution for this.
Thanks,
Chiru
Hi Chiru
Do you see my example?
I think it was what you need...