Forum Discussion

DivyaPuri's avatar
DivyaPuri
New Contributor
4 years ago

if-else condition in Member Filter Builder Cube View

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

6 Replies

  • JohnMorehead's avatar
    JohnMorehead
    New Contributor III

    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?

  • DivyaPuri's avatar
    DivyaPuri
    New Contributor

    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.

    • ckattookaran's avatar
      ckattookaran
      VIP

      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

    • JohnMorehead's avatar
      JohnMorehead
      New Contributor III

      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!

    • aformenti's avatar
      aformenti
      Contributor II

      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.