Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I am trying to have confitional formatting on a table, when each customer number(Klantnr) has the same background colour. This helps me to have a quick overview what salesline belogs to the same order.
This is a preview of what I am looking for:
Can anyone help me out?
Thank you in advance!
Tom
Thank you for the answers @AndrewPF @visheshjain
Is it maybe possible to do something like this (made an example in Excel)? I can provide a color for number 1 to 30 with a color, since there will not be more than 30 customers max in the table.
Hi @TomBrilliant,
Rather than numbers, my suggestion would be to use Hex Code for colors.
You can find them extremely easily with a Google search.
P.S. - Here is the link to conditionally format on string values as well, available since Feb 2023 update.
Thank you,
Vishesh Jain
Proud to be a Super User!
Hi @TomBrilliant ,
You can define a dax measure where you can provide a color for every single customer number and then use it as conditional formatting.
The Feb 2023 update has the same thing simplified, where you can have conditional formatting based on text.
My suggested solution would be, assumming you have a lot of customers, is to have a table of all the customer numbers and a color associated with that number, which I think will be easier to create, than writing down all the customer numbers in a dax measure.
Then use this table in an IF() function with SELECTEDVALUE() to get the DAX measure for conditional formatting.
Hope this helps and if it does, then please do mark it as the best answer.
Thank you,
Vishesh Jain
Proud to be a Super User!
You can only format conditionally on a numeric value.
If your customer numbers are finite and discrete, you could try creating a new column - customer ID, for example - where:
if [Klantnr] = "D10852" then [customer ID] = 1
else if [Klantnr] = "D11014" then [customer ID] = 2
etc..
then apply the conditional format using the new customer ID.