Pawel
3 months agoNew Contributor II
Composite rule for filled value only
Hi,
is there a way how to apply composite rule on filled value only? If I use U8#* it takes every record filled or not.
My intention is to use another rule behind this one to fill default value for blank source.
This is not a good use case for using a composite rule. Composite rules are best used when a member in one or more other dimensions drives the mapping of the current dimension.
Here's how I would approach this:- Add code in your connector rule to detect null or empty string in the fields where blanks may come in, and replace them with something like <BLANK>
- You could use a form of logical expression. I prefer using connector rules because they have more structure and are easier to see, code, and troubleshoot.
- Create a Mask rule
- Expression: *
- Target Value: *
- Create a One-To-One rule to map <BLANK> to whatever target member (e.g. None) you want
The transformation rules will run the One-To-One first, and whatever is left will be mapped by the Mask, anything not <BLANK> in this case.
- Add code in your connector rule to detect null or empty string in the fields where blanks may come in, and replace them with something like <BLANK>