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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kaushik2020
New Member

Card (New) Text color property

I am using a Card (new) in my sales dashboard. Currently i am using an expression to calculate the values. I wanted to know how i can set the text color to red and green based on the value. If the value is greated than  then Greeen else Red.

kaushik2020_0-1756108830464.png

Sales_CYToPY =
VAR MaxDateValue = CALCULATE(MAX(MasterCalendar[Date]), ALL(MasterCalendar))
VAR CurrStartOfYear = DATE(YEAR(MaxDateValue), 1, 1)
VAR PrevStartOfYear = DATE(YEAR(MaxDateValue)-1, 1, 1)
VAR PrevEndOfYear = DATE(YEAR(MaxDateValue)-1, MONTH(MaxDateValue), DAY(MaxDateValue))

VAR CurrSales =
    CALCULATE(
        SUM(Orders_Details[Sales]),
        DATESBETWEEN(MasterCalendar[Date], CurrStartOfYear, MaxDateValue),
        ALL(MasterCalendar[Year], MasterCalendar[Month], MasterCalendar[Day])
    )

VAR PrevSales =
    CALCULATE(
        SUM(Orders_Details[Sales]),
        DATESBETWEEN(MasterCalendar[Date], PrevStartOfYear, PrevEndOfYear),
        ALL(MasterCalendar[Year], MasterCalendar[Month], MasterCalendar[Day])
    )

VAR GrowthRatio = DIVIDE(CurrSales, PrevSales, 0)
VAR GrowthPct = IF(GrowthRatio = 0, BLANK(), GrowthRatio - 1)

RETURN
IF(
    ISBLANK(GrowthPct),
    BLANK(),
    IF(
        GrowthPct >= 0,
        UNICHAR(9650) & " " & FORMAT(GrowthPct, "#,##0.0%"),
        UNICHAR(9660) & " " & FORMAT(GrowthPct, "#,##0.0%")
    )
)
1 ACCEPTED SOLUTION
OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

On the formatting pane of the visual go to Callout values and there you can define a rule for coloring:

OktayPamuk80_0-1756110819551.png

 

Regards,

Oktay

 

Did it help? Please provide a KUDOS and mark the answer as solution

 

View solution in original post

5 REPLIES 5
OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

Glad it worked out so fast.

Cheers, Oktay

Hi @OktayPamuk80  Yes Indeed. I was trying with an expression to achieve the same. but was wondering if there is an option same as Qlik Sense. Thanks again 🙂 

Hi, I worked a long time with Qlik Sense. However, there are features that you will miss in Power BI. Especially the conditional formatting options generally are same in Qlik Sense in each visual, this is not the case in Power BI. Additionally, conditional hide/show of visuals, columns, measures, etc. are not that easily to implement in Power BI.

True, in Qlik Sense it was fully customized with the objects. if you wish to change anything in terms of the design in the css property to match the organisation color banding alog with the functionality. let's see how much we have in Power BI. 
few things like a CROSS TABLE load (Pivoting and un-pivoting) i liked most as of now in Power BI.

OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

On the formatting pane of the visual go to Callout values and there you can define a rule for coloring:

OktayPamuk80_0-1756110819551.png

 

Regards,

Oktay

 

Did it help? Please provide a KUDOS and mark the answer as solution

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.