Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ashmitp869
Post Partisan
Post Partisan

Color of report not exporting when export to excel ?

Hi ,

 

I have report which contains color code against employees hours.

ashmitp869_1-1727057129505.png

 

When export to excel the color code is not exporting . The users wants the color to be exported when they export it to excel.

Any sugesstion.

 

2 REPLIES 2
suparnababu8
Super User
Super User

Hi @ashmitp869 

I think that feature not yet supported by Power BI. You can only export values not colors. If you need this feature you may submit your idea to Micorsoft.

 

Submit your idea here - https://ideas.fabric.microsoft.com/

 

Additionally if you need any information pls go through this - https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-export-data?tabs=powerbi-d...

 

Hope this helps you!

How can I put the Color Condition formating similar like Power BI with Inforiver matrix.

BackgroundColor = 
VAR WeekdayNum = WEEKDAY(MAX('Date'[Date]), 2)
VAR LeaveReasonCode = SELECTEDVALUE(ConnXLeave[Leave_Reason_Code])
VAR LeaveLengthType = SELECTEDVALUE(ConnXLeave[Leave_Length_Type])
RETURN
IF (
    LeaveLengthType = "part-day", 
    "RGB(0, 0, 0)",  // Black
    IF (
        SUM(ConnXLeave[Leave_Hours]) > 0,
        SWITCH (
            TRUE(),
            LeaveReasonCode IN { "A", "L", "LIL" }, "RGB(153, 204, 255)",   // Light Blue
            LeaveReasonCode IN { "ACC", "WC" }, "RGB(112, 48, 160)",       // Dark Purple
            LeaveReasonCode IN { "AWLP", "ALAA" }, "RGB(153, 102, 255)",   // Medium Purple
            LeaveReasonCode IN { "CC", "CN", "SC", "SN" }, "RGB(255, 153, 204)", // Pink
            LeaveReasonCode = "ANP", "RGB(191, 191, 191)",                // Grey
            LeaveReasonCode IN { "B", "J", "PL" }, "RGB(102, 255, 255)",  // Cyan
            "RGB(127, 212, 255)"                                              // Default Light Blue
        ),
        IF (
            WeekdayNum IN { 1, 2, 3, 4, 5 },  // Mon to Fri
            SWITCH (
                TRUE(),
                SUM(ConnXLeave[Leave_Hours])  > 0, "RGB(127, 212, 255)",                   // Light Blue
                SUM(DSR[DSR_TimeSheet_Total_Hours])  > 10 || SUM(TimeCard[Hours]) > 10, "RGB(255, 170, 42)",     // Orange
                SUM(DSR[DSR_TimeSheet_Total_Hours])  >= 8 || SUM(TimeCard[Hours]) >= 8, "RGB(127, 255, 85)",     // Light Green
                SUM(DSR[DSR_TimeSheet_Total_Hours])  > 0 || SUM(TimeCard[Hours]) > 0, "RGB(255, 255, 0)",       // Yellow
                SUM(DSR[DSR_TimeSheet_Total_Hours])  <= 0 && SUM(TimeCard[Hours]) <= 0, "RGB(255, 0, 0)",    // Red
                BLANK()
            ),
            IF (
                WeekdayNum IN { 6, 7 },  // Sat, Sun
                SWITCH (
                    TRUE(),
                    SUM(ConnXLeave[Leave_Hours])  > 0, "RGB(127, 212, 255)",               // Light Blue
                    SUM(DSR[DSR_TimeSheet_Total_Hours])  > 10 || SUM(TimeCard[Hours]) > 10, "RGB(255, 170, 42)", // Orange
                    SUM(DSR[DSR_TimeSheet_Total_Hours])  > 0 || SUM(TimeCard[Hours]) > 0, "RGB(127, 255, 85)",  // Light Green
                    SUM(DSR[DSR_TimeSheet_Total_Hours]) = 0 && SUM(TimeCard[Hours]) = 0, "RGB(255, 255, 255)", // White
                    BLANK()
                ),
                BLANK()
            )
        )
    )
)

ashmitp869_0-1727223319360.png

 

FontColor = 
VAR LeaveReasonCode = SELECTEDVALUE(ConnXLeave[Leave_Reason_Code])
VAR LeaveLengthType = SELECTEDVALUE(ConnXLeave[Leave_Length_Type])
VAR DSR_Status = SELECTEDVALUE(DSR[DSR_Status])
RETURN
    SWITCH(
        TRUE(),
        LeaveLengthType = "part-day", "white",
        OR(
            DSR_Status = "Entry",
            DSR_Status = "Submitted"
        ) || DSR_Status = "Reviewed" || LeaveReasonCode = "P", "lightred",
        OR(
            DSR_Status = "Approved-PM",
            LeaveReasonCode = "A"
        ) || LeaveReasonCode = "C", "black",
        BLANK()  // Default case if none of the conditions are met
    )

As I have Background color and Font Color in the Power BI matrix visual. Please suggest.

 

@Ritaf1983 Will you able to help. Referencing from this thread

https://community.fabric.microsoft.com/t5/Desktop/PBI-report-help-needed-to-format-when-exported-to-...

@Ritau

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.