Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,,
I have date wise Inventory with below columns -
Date | Particulars | Stock |
29-Oct-17 | Raw | 200 |
29-Oct-17 | Mfg | 100 |
29-Oct-17 | Ref | 300 |
30-Oct-17 | Raw | 250 |
30-Oct-17 | Mfg | 310 |
30-Oct-17 | Ref | 280 |
31-Oct-17 | Raw | 230 |
31-Oct-17 | Mfg | 400 |
31-Oct-17 | Ref | 200 |
1-Nov-17 | Raw | 370 |
1-Nov-17 | Mfg | 500 |
1-Nov-17 | Ref | 200 |
I want to pick 1st nov data in piechart
as Raw = 370, Mfg = 500, Ref = 200
Thanks,
Vikas
Script:
Inventory:
LOAD Date(Date#(Date,'DD-MMM-YY'),'DD-MMM-YY') as Date, Particulars, Stock;
LOAD * INLINE [
Date, Particulars, Stock
29-Oct-17, Raw, 200
29-Oct-17, Mfg, 100
29-Oct-17, Ref, 300
30-Oct-17, Raw, 250
30-Oct-17, Mfg, 310
30-Oct-17, Ref, 280
31-Oct-17, Raw, 230
31-Oct-17, Mfg, 400
31-Oct-17, Ref, 200
1-Nov-17, Raw, 370
1-Nov-17, Mfg, 500
1-Nov-17, Ref, 200
];
Pie Chart:
Dimension: Particulars
Expression: Sum({<Date = {"$(=Max(Date))"}>} Stock)
Create Pie chart
Dimension - Particulars
Expression
Sum({<Date = {$(=Max(Date))}>} Stock)
Where Date should be format of Date(Date, 'DD-MMM-YY') as Date
This do not work
Can you suggest more
Hi Vikas,
Like this?
yes
Have a look at the attachment.
Can you provide me the direct expression
Script:
Inventory:
LOAD Date(Date#(Date,'DD-MMM-YY'),'DD-MMM-YY') as Date, Particulars, Stock;
LOAD * INLINE [
Date, Particulars, Stock
29-Oct-17, Raw, 200
29-Oct-17, Mfg, 100
29-Oct-17, Ref, 300
30-Oct-17, Raw, 250
30-Oct-17, Mfg, 310
30-Oct-17, Ref, 280
31-Oct-17, Raw, 230
31-Oct-17, Mfg, 400
31-Oct-17, Ref, 200
1-Nov-17, Raw, 370
1-Nov-17, Mfg, 500
1-Nov-17, Ref, 200
];
Pie Chart:
Dimension: Particulars
Expression: Sum({<Date = {"$(=Max(Date))"}>} Stock)
Thanks
This worked