none
Calculated Member - Back_Color Not Working (Fore_color works)

    Question

  • Good day,

    I get the fore_colour working, even when selecting from form view the back colour from calaculated member does not want to work

           

    FORE_COLOR(THIS)=8421504; -- 255 RED       

          

    // BACK_COLOR(THIS)=255;

    Please Help

    Friday, May 18, 2018 8:05 AM

All replies

  • Hi Ismailc1,

    Thanks for your question.

    Please try to use below MDX code:

    back_color(this) = RGB(255,0,0); 


    As I test below MDX expression, It works properly for me:

    Scope
    ([Product].[Category].&[1], 
    [Measures].[Sales Amount] );   
       back_color(this) = RGB(255,0,0); 
    End Scope; 


    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 18, 2018 10:13 AM
    Moderator
  • Hi, I just cant get it going,

    CREATE MEMBER CURRENTCUBE.[Consensus Dimension].[Consensus Structure].[Consensus].&[6]&[2].[FCST Promo (3-12)] AS null; scope ([Consensus Dimension].[Consensus Structure].[Consensus].&[6]&[2].[FCST Promo (3-12)]); this=([Consensus Dimension].[Consensus Structure].[Consensus Forecast].&[5],[Measures].[CurrDemPromoPlusValue]); FORMAT_STRING(THIS)= "#,###"; FORE_COLOR(THIS)=8421504; back_color(this) = RGB(255,0,0);

    end scope;


    I only manage to change the Font Fore_color but not back_color?

    Could it be that this is a calculated Member and not calculated measure?



    • Edited by Ismailc1 Friday, May 18, 2018 12:52 PM
    Friday, May 18, 2018 12:50 PM
  • I'm curious, why use scoped assignment here? Why not just include the formula, format string, and colors in the original create member statement?

    Expect me to help you solve your problems, not to solve your problems for you.

    • Proposed as answer by alexander fun Monday, May 21, 2018 11:52 AM
    Friday, May 18, 2018 1:13 PM
  • Hi Ismailc1,

    Thanks for your response.

    >>>Could it be that this is a calculated Member and not calculated measure?

    If it is a calculated Member, then you can try to add Back_Color = 6384849 like below MDX expression:

    CREATE MEMBER CURRENTCUBE.[Product].[Category].[ALL].[Bike & ACC]
    AS 
    Aggregate({[Product].[Category].&[1],
                [Product].[Category].&[4]}
               )
    ,Back_Color = 6384849, VISIBLE=1;  


    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by alexander fun Monday, May 21, 2018 11:51 AM
    Monday, May 21, 2018 7:37 AM
    Moderator