Skip to main content
August 22, 2025
Solved

Composite rule for filled value only

  • August 22, 2025
  • 1 reply
  • 0 views

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.

 

Best answer by RobbSalzmann

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:

  1. 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>
    1. 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.
  2. Create a Mask rule
    1. Expression: *
    2. Target Value: *
  3. 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.

1 reply

August 22, 2025

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:

  1. 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>
    1. 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.
  2. Create a Mask rule
    1. Expression: *
    2. Target Value: *
  3. 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.