Forum Discussion

jaryszek's avatar
jaryszek
Super User
7 months ago
Solved

Power BI conditional formatting using a disconnected table

Hello, I have a Power BI model with a fact table that contains budget values (both positive and negative) by date, department, and account, and I’m displaying the data in a matrix. I want to ha...
  • cengizhanarslan's avatar
    7 months ago

    Use this as Field value for background/font color:

    [Budget Color] =
    VAR v = [Budget]
    RETURN
    IF (
        ISBLANK ( v ),
        BLANK(),
        MAXX (
            FILTER (
                Fmt_BudgetRules,
                v >= Fmt_BudgetRules[MinValue]
                    && v < Fmt_BudgetRules[MaxValue]
            ),
            Fmt_BudgetRules[ColorHex]
        )
    )

    Format pane → Conditional formatting → Background color (or Font color) →

    • Format by: Field value

    • Based on field: [Budget Color]