Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have a request to attach a field to a table based on a random selection from a previously loaded table.
I have a set of Facts that are devoid of the dimension Market.
I have a second set of Facts that get concatenated to the previous one which does include Market.
My task is to apply that Market from the second set of Facts randomly to the first set, so as to be able to view the filter across all Facts Even though the Market is completely unrelated between the two data sets at the current time, it will be available in the future, and this is for an example of the future functionality.
So, I have to attach the Market to the entire data set, but I do not have a key to map to. I just need to randomly pick a Market from the second data set for each row in the first.
Any idea how I can do this?
Thanks in advance!
First load the set with the Market values and then try something like this in the second load statement:
FieldValue('Market', Ceil(Rand()*FieldValueCount('Market'))) as Market
Hmmm...
Not sure I'm doing this correctly.
When referencing 'Market' in this expression, it needs to already exist in the Fact table, correct?
When I try to load it and reference it from another table it returns field not found.
But, if i use this expression after the Fact tables are already concatenated, wouldn't it be adding the null field value to the generated list of possible Markets?
Nevermind! Figured it out.
This method works perfect.
THANKS!!!