Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table field (REQUIREMENT.DIMENSION) with both whole number and fraction values, if I only want to use the whole number values, how do I do that so that it completely ignores the fraction values either in a chart or in the load script?
Thank you.
You can restrict those values from script itself. Just change substringcount() as below:
Table:
load
....
...
From [XYZ.qvd] where substringcount(FieldName , '/') = 0 ;
Regards,
Aditya
Load Floor(REQUIREMENT.DIMENSION) as REQUIREMENT.DIMENSION
-Rob
Thanks Rob, would this not round down the fraction values? it's a case of one part having multiple Dimensions but I only want to deal with the values which are not fraction and ignore the others. Thanks
floor() should do the work for you could you share sample data
If you want to exclude fraction values from the data itself, you can use where condition like:
Table:
load
....
...
From [XYZ.qvd] where substringcount(FieldName , '.') = 0 ;
Regards,
Aditya
Maybe flagging the values could work:
LOAD
(Floor(REQUIREMENT.DIMENSION) = REQUIREMENT.DIMENSION) AS isInt,
REQUIREMENT.DIMENSION,
...
FROM
[lib://file.qvd]
(qvd);
Then use Set Analysis to only get these values.
May be like:
Where Frac(REQUIREMENT.DIMENSION) =0 ;
There are multiple corresponding Dimensions for every BaseID, what I am wanting to do is call only the BaseID where the Dimensions are whole numbers.
Find below
Same code as above or, based on the format you have, reversed:
NOCONCATENATE LOAD
REQ.DIM,
(Floor(REQ.DIM) = REQ.DIM) AS isInt,
SubStringCount(REQ.DIM, '/') > 0 AS isFraction
RESIDENT
Data;
You can restrict those values from script itself. Just change substringcount() as below:
Table:
load
....
...
From [XYZ.qvd] where substringcount(FieldName , '/') = 0 ;
Regards,
Aditya