11-23-2021 04:36 PM - last edited on 05-24-2023 11:52 AM by JackLacava
Source: Migrated from Champions
Hi Team,
Hope you are safe and doing well.
I am attempting to display members using the if-else condition in cubeview.
Does anyone know if it’s possible to use the if-else condition in Member Filter Builder Cube View?
Thanks in advance
11-23-2021 04:36 PM
The only way that I know of to implement that is through an XFBR rule. What is the if-else condition you are trying to switch on?
11-23-2021 04:37 PM
+1 for the XFBR
11-23-2021 04:38 PM
To answer question:-
I have E#Root.WFCalculationEntities in cubeview member filter. I want to add condition, if E#Root.WFCalculationEntities is blank, then E#Top.
I am during this using XFBR, but wanted to check, if someone tried if else in CV memberfilter.
11-23-2021 04:38 PM
You can write an XFBR that gets the profile entities. If that list is nothing (maybe you can also do a count = 0) then return E#Top else return E#Root.WfProfileentities
11-23-2021 04:39 PM
Yeah, XFBR is the only way I know to do that. I would encourage you to maybe write a more generic XFBR where you pass in the prefix (E# in this case) and filter (Root.WFCalculationEntities), and if the list returned is empty, then return the passed prefix (E#) and Top. This assume of course that all of your dimensions have a Top, which is most common. That way you can reuse this logic elsewhere in your application at no additional development cost. Anyway, you’re on the right track, good luck!
11-24-2021 08:40 AM
Hi DivyaPuri,
To do what you described, I believe you could use a Member filter parameter and set the Default Value to E#Top.
Otherwise, you could also use Member Lists as a Finance Business Rule, as you would do with the XBR. The advantage is that you can leverage them elsewhere.