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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
suzsword
Frequent Visitor

Conditional formatting

I have calculated table that allows me to produce a summary matrix, but I need to conditionally format specific rows but I'm not sure that i can do it. 

 

 

DataTable.PNG

 

This is the  data table that I am using. It ihas been created using DAX 

Current Summary Data = UNION(
    --BOPD    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Actual",
            "Value (T)", calculate(SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd]), filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
            ) -- end of BOPD
,     --Forecast    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Forecast",
            "Value (T)", calculate(SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]), filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
)  --end of Forecast
,  
    --budget    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Budget",
            "Value (T)", calculate(SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[target]), filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
) -- end of budget
,
    --BOPD   YTD 
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Actual",
            "Value (T)", calculate(AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd]), filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
            ) -- end of BOPD
,     --Forecast    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Forecast",
            "Value (T)", calculate(AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]), filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
)  --end of Forecast
,  
    --budget    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Budget",
            "Value (T)", calculate(AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[target]), filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
) -- end of budget
,  
    --Delta Budget Actual    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Delta Budget",
            "Value (T)", calculate(SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-sum('pds V_FIELD_BOPD_TARGET_FORECAST'[target]), 
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
) -- end of budget
,    --Delta Budget Actual
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Delta Budget",
            "Value (T)", calculate(AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[target]), 
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
) -- end of budget
,  
    --Delta Budget Percent    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Delta Budget %",
            "Value (T)", calculate(  ( (SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-sum('pds V_FIELD_BOPD_TARGET_FORECAST'[target])) / sum('pds V_FIELD_BOPD_TARGET_FORECAST'[target]) *100)  ,
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
) -- end of budget
,    --Delta Budget Percent
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Delta Budget %",
            "Value (T)", calculate(   (  (AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[target]) ) / AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[target]) * 100) , 
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
) -- end of budget

,  
    --Delta Forecast Actual    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Delta Forecast",
            "Value (T)", calculate(SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-sum('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]), 
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
) -- end of forecast
,    --Delta Forecast Actual
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Delta Forecast",
            "Value (T)", calculate(AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]), 
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
) -- end of budget
,  
    --Delta Forecast Percent    
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "Today",
            "Type" , "Delta Forecast %",
            "Value (T)", calculate(  ( (SUM('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-sum('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast])) / sum('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]) *100)  ,
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', 'pds V_FIELD_BOPD_TARGET_FORECAST'[full_date]= max('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])))
) -- end of budget
,    --Delta forecast Percent
    SUMMARIZECOLUMNS(DimFieldGroup[Group Name], 
            "Time", "YTD",
            "Type" , "Delta Forecast %",
            "Value (T)", calculate(   (  (AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[bopd])-AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]) ) / AVERAGE('pds V_FIELD_BOPD_TARGET_FORECAST'[forecast]) * 100) , 
                        filter('pds V_FIELD_BOPD_TARGET_FORECAST', YEAR('pds V_FIELD_BOPD_TARGET_FORECAST'[full_date])= YEAR(TODAY())))
) -- end of Delta Forecast percent
)  -- end of union

and below is the matrix visualisation with the rows that I need to format circled. 

 

Visual.PNG

Is this even possible?

Can I choose font colours in DAX? 

 

Susan

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@suzsword ,

 

You may take a look at Color formatting by field value.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@suzsword ,

 

You may take a look at Color formatting by field value.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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