Hi @julia.bauer,
This is possible through custom objects and custom attributes. You can create display rules with them.
https://docs.celonis.com/en/knowledge-model---custom-objects-and-custom-attributes.html
1) Example without data - KPI - I want to color the number (in in e.g. red
It would look something like this:
customObjects:
- id: DISPLAY_RULE_1
displayName: Display rule 1
customAttributes:
- comparator: IS_EMPTY
style: #styles to change the cell's appearance
textColor: red
fontSize: 16px
fontItalic: false
fontWeight: bold
You can then put the display rule in your YAML for the KPI.
- id: attribute
type: attribute
settings:
data:
- id: INVOICE.TOTAL_NUMBER_OF_INVOICES
displayContentRule: DISPLAY_RULE
You would do the same for the background color of column in an OLAP table, but then you would set in your display Rule the backgroundColor key under "style"
Let me know if you need help with this!
Kind regards,
Sverre Klein
Hi @julia.bauer,
This is possible through custom objects and custom attributes. You can create display rules with them.
https://docs.celonis.com/en/knowledge-model---custom-objects-and-custom-attributes.html
1) Example without data - KPI - I want to color the number (in in e.g. red
It would look something like this:
customObjects:
- id: DISPLAY_RULE_1
displayName: Display rule 1
customAttributes:
- comparator: IS_EMPTY
style: #styles to change the cell's appearance
textColor: red
fontSize: 16px
fontItalic: false
fontWeight: bold
You can then put the display rule in your YAML for the KPI.
- id: attribute
type: attribute
settings:
data:
- id: INVOICE.TOTAL_NUMBER_OF_INVOICES
displayContentRule: DISPLAY_RULE
You would do the same for the background color of column in an OLAP table, but then you would set in your display Rule the backgroundColor key under "style"
Let me know if you need help with this!
Kind regards,
Sverre Klein
Hello Sverre,
thanks for your help!
This is how I incorporated the display rule in the YAML KM View:
- id: DISPLAY_RULE_1
displayName: Display rule 1
internalNote: essential
customAttributes:
- style:
label: true
fontSize: 16px
textColor: "#E8001F"
comparator: IS_NOT_EMPTY
fontitalic: false
fontweight: bold
When trying to add the display to the KPI in the view (after publishing the KM) it does not work - the coloring does not change.
I've tried this with multiple display rules and it's always the same issue.
Could you fathom what the cause of this is?
Thank you!
Best regards
Julia Bauer
Hi @julia.bauer,
The comparator must not be part of the style attribute, it should be part of customAttributes key.
Remember that the comparator "IS_NOT_EMPTY" does not require a value to be compared with. Let me know if this works for you!
Kind regards,
Sverre Klein
Hi @julia.bauer,
The comparator must not be part of the style attribute, it should be part of customAttributes key.
Remember that the comparator "IS_NOT_EMPTY" does not require a value to be compared with. Let me know if this works for you!
Kind regards,
Sverre Klein
Hello @sverre.klein11,
thank you so much - I totally oversaw this. Now it is working!
Best regards,
Julia Bauer