Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have this data
| Quarter | showen | Qlast | Data |
|---|---|---|---|
| 1 | Qx | 4 | 100 |
| 2 | Qy | 1 | 40 |
| 3 | Qz | 2 | 30 |
| 4 | Qs | 3 | 50 |
the field that's showen in the document (the field i select from it) is 'Showen'
i want to write ana expression that's when i select from field showen it gives me the data of the Quarter=Qlast
i mean if i select Qx in this case Qlast=4 so i want te expression to give me the data when Quarter=4 Which is 50
another example: if i select Qy, Qlast =1 so i want to get the data when Quarter=1 which is 100
and so on
how to do that?
Maybe like
=Only({1<Quarter = {$(=Only(Qlast))}>} Data)
Thanks Swuehl, but it didn't work
also, i have to use sum on the data because the original table i have has multiple rows, the example above is just to clarify the idea
Use below :
I have loaded sample data with inline load.
Temp_Tlb:
LOAD * INLINE [
Quarter,showen,Qlast,Data
1,Qx,4,100
2,Qy,1,40
3,Qz,2,30
4,Qs,3,50
];
Right Join
Res_Tlb:
LOAD Quarter as Qlast,
Data as Temp_Data
Resident Temp_Tlb;
In Expression use sum(Temp_Data) to get the desired result.
Regards,
Abhijit B