Forum Discussion
Remove filter in If statement
- 9 years ago
How about creating two calculated columns:
Total Costs = IF(PL_Blink_Cube[SCOA Level06 ID] = 4500000000, PL_Blink_Cube[Amount],BLANK())
Some Costs = IF(PL_Blink_Cube[SCOA Level10 ID] = 64405401, PL_Blink_Cube[Amount],BLANK())
This way you keep the rest of the table and have all your relationships.
maybe its better to use a switch statement
switch(true(),
and, (PL_Blink_Cube[SCOA Level06 ID] = 4500000000 ,PL_Blink_Cube[SCOA Level10 ID] <> 64405401), "fixed costs",
and, PL_Blink_Cube[SCOA Level06 ID] = 4500000000 ,PL_Blink_Cube[SCOA Level10 ID] = 64405401), "some fixes costs",
BLANK ()
)
havent tested it
Hi Vanesse,
Thanks for your reply, but this does not work,
A single value for column 'SCOA Level10 ID' in table 'PL_Blink_Cube' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
- vanessafvg9 years agoCommunity Champion
Sander800 are you creating a measure or a column? are these in the same table?
also i see a syntax error
test =
SWITCH (
TRUE (),
AND (
PL_Blink_Cube[SCOA Level06 ID] = 4500000000,
PL_Blink_Cube[SCOA Level10 ID] <> 64405401
), "fixed costs",
AND (
PL_Blink_Cube[SCOA Level06 ID] = 4500000000,
PL_Blink_Cube[SCOA Level10 ID] = 64405401
), "some fixes costs",
BLANK ()
)- Sander8009 years agoHelper I
Unfortunately this still does not work.
The initial filter on Level 06 overrules the selections I want to apply on Level 10. So I do see the the 'fixed costs' but not the 'some fixed costs'.
The problem remains the same. I understand the difficulty since I filter on two different levels so the real trick is to undo a the filter on level 6 and then reapply a 'clean' filter on level 10, within the same column basically.
- Anonymous9 years agoNot applicable
Sander800,
Could you please share sample data of your table? Which column do you use to calculate 500 and 20?
Regards,