Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
HIguys,
Just wondring if is possible to format variables depending on the result returned. I've highighted the desired format for each variable in red.
Thanks in advance for your help.
TOTALS =
VAR
Price_List_Errors = FINANCIAL_KPIs_Link[PRICE LIST ERRORS] Whole number
VAR
Sales = FINANCIAL_KPIs_Link[SALES FIGURE] Currency (€)
VAR
GP = FINANCIAL_KPIs_Link[GROSS PROFIT] %
RETURN
SWITCH(FINANCIAL_KPIs_Link[NUMBER],
1, Price_List_Errors,
2, Sales,
3, GP)
Solved! Go to Solution.
Yes, you can use FORMAT function.
SWITCH(FINANCIAL_KPIs_Link[NUMBER],
1, FORMAT ( [Price_List_Errors], "#,##" ),
2, FORMAT ( [Sales], "#,##0 €" ),
3, FORMAT(GP, "percent")
)
Thank you very much, that worked perfectly.
Is it possible to apply conditional formatting to individual variables (Red for bad, green for good)
Hi @brianhackett5,
Have you resolved your issue? If you have, please mark the right reply as answer, so more members benefit more from here. As the @vik0810 said, we can't add the conditional formatting directly, please try the solution he shared. And please feel free to ask if you have other issue.
Best Regards,
Angelia
Not directly. But you can use 2 cards and lay them one over the other. One is formatted to text red and bound to the measure like
IF(Variable < 0, Variable, BLANK())
and the other card hast text green and the measure is vice versa
IF(Variable >= 0, Variable, BLANK())
Yes, you can use FORMAT function.
SWITCH(FINANCIAL_KPIs_Link[NUMBER],
1, FORMAT ( [Price_List_Errors], "#,##" ),
2, FORMAT ( [Sales], "#,##0 €" ),
3, FORMAT(GP, "percent")
)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 26 | |
| 24 | |
| 16 |
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 38 | |
| 30 | |
| 21 |