Forum Discussion

KR300's avatar
KR300
Icon for Helper III rankHelper III
1 year ago
Solved

Showing different color to a second line when combining the data using CONCATENATE & UNICHAR(10)

I have 5 columns  R0und, Planned Start Date, Planned End Date, Actual Start Date, Actual End Date

 

I am combining all the data using a calculated column

Planned / Actual Timelines 4 =
Var _Round = 'Release Train Details'[Round]
Var _D1 = IF(ISBLANK('Release Train Details'[Planned Start Date]),"TBA",FORMAT('Release Train Details'[Planned Start Date],"DD/MM"))
                    &"-"&IF(ISBLANK('Release Train Details'[Planned End Date]),"TBA",FORMAT('Release Train Details'[Planned End Date],"DD/MM"))
VAR _D2 = IF(ISBLANK('Release Train Details'[Actual Start Date]),"TBA",FORMAT('Release Train Details'[Actual Start Date],"DD/MM"))
                    &"-"&IF(ISBLANK('Release Train Details'[Actual End Date]),"TBA",FORMAT('Release Train Details'[Actual End Date],"DD/MM"))

RETURN
CONCATENATE(_Round,
    CONCATENATE(UNICHAR(10),
        CONCATENATE(_D1,
            CONCATENATE(UNICHAR(10),_D2) --- i want this data as a different color in table visual
        )
    )
)
 
ANS: example
Round1
25/02-25/02 ( Planned Timeline)
26/02-26/02 ( Actual Timeline )  -- & I want to show that line as a different color
Round2
25/02-25/02 ( Planned Timeline)
26/02-26/02 ( Actual Timeline )  -- & I want to show that line as a different color
 
like below


 

 Can we create a measure instead of the Calculated Column.?
 
 
 
 

7 Replies

  • Deku's avatar
    Deku
    Icon for Super User rankSuper User

    You cannot colour a substring 

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI KR300,

    You can try to unpivot these date fields to convert them to attribute and date values, then you can use this attribute field on legend to assign different colors based on their attribute group:

    Unpivot columns - Power Query | Microsoft Learn

    Regards,

    Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi KR300 ,

    Any update on this? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

    If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng

  • v-achippa's avatar
    v-achippa
    Icon for Community Support rankCommunity Support

    Hi KR300,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you Deku and Anonymous for the prompt response.

     

    We wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
    If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

     

    Thanks and regards,

    Anjan Kumar Chippa

    • v-achippa's avatar
      v-achippa
      Icon for Community Support rankCommunity Support

      Hi @KR300,

       

      As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
      If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

       

      Thanks and regards,

      Anjan Kumar Chippa

      • v-achippa's avatar
        v-achippa
        Icon for Community Support rankCommunity Support

        Hi @KR300,

         

        We wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
        If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

         

        Thanks and regards,

        Anjan Kumar Chippa