Forum Discussion
How to apply icon conditional formatting on text fields
- 3 years ago
Hi Anonymous ,
We can add a Icon formatting by clicking on column name >> select Conditional Formatting option and click on Icons option as shown in the below screenshot,
This will open the dialog to set values-based conditions to display icons, where we need to add value conditions for 1, 2 and 3 with required icons as shown in the below screenshot,
This will show the icons along with data as shown in below screenshot,
In Power BI, Icon Formatting we have 3 options for displaying Icons that are icons left to the data, right to the data and Only icon without data in each cell. So, if you want only icons without 1, 2 ,3 value and other cell should display text as it is then we need to do a workaround by creating a Column to define font colour of text to be white in case values are 1, 2, 3.
DAX for column will be as follows,
DataColor = IF('Table'[B] = "1" || 'Table'[B] ="2" || 'Table'[B] = "3", "White","")
Now will use this colour column for font Color conditional formatting as shown below
The output will be as follows,
Thanks!
Inogic Professional Services Division
Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!
Drop an email at [email protected]
Services: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Hi Anonymous ,
We can add a Icon formatting by clicking on column name >> select Conditional Formatting option and click on Icons option as shown in the below screenshot,
This will open the dialog to set values-based conditions to display icons, where we need to add value conditions for 1, 2 and 3 with required icons as shown in the below screenshot,
This will show the icons along with data as shown in below screenshot,
In Power BI, Icon Formatting we have 3 options for displaying Icons that are icons left to the data, right to the data and Only icon without data in each cell. So, if you want only icons without 1, 2 ,3 value and other cell should display text as it is then we need to do a workaround by creating a Column to define font colour of text to be white in case values are 1, 2, 3.
DAX for column will be as follows,
DataColor = IF('Table'[B] = "1" || 'Table'[B] ="2" || 'Table'[B] = "3", "White","")
Now will use this colour column for font Color conditional formatting as shown below
The output will be as follows,
Thanks!
Inogic Professional Services Division
Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!
Drop an email at [email protected]
Services: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/