Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Friends
I was wondering if you have a good solution to setting certain data points/variables of a field in a table to be assigned a hex code so that when it is used in any visual that it is by default assigned this hex code? I know that we can pick / customise a hex code colour when it is in a visual however considering the volume of dashboards we need to create in a limited time this would be very time consuming. I know that we can create a default hex code per visual but I am after a solution where in any visual used this would be a default colour.
I used this solution but the limitation is that it doesn't work for line graphs: https://www.youtube.com/watch?v=-FG0DSSAr60
Data:
E.g of specific variables assigned hex codes always
Class 1 = #FFFFFF
Class 2 = #FFA500
Class 3 = #FF0000
Class 4 = #00FF00
this is my code but it isn't translating into any of the line graph visuals... each value in a field here would be a name
colour hex #:
VAR selected value = SELECTEDVALUE(table[field]))
Return
SWITCH(selectedValue,
"A", "#FF0000"
"B", "#FFA500",
"#FFA500")
any suggestions on better process, script or perhaps SQL code is much appreciated
Many thanks in advance!
Thanks for your response 🙂 Essentially, using themes is too manual and slow because you would need to update each bar or line based on the data point. I was thinking about something faster like the script i provided above where certain data points in a field is hardcoded a hex code colour to speed up dashboard production. However, the caveat is that it doesn't populate for lines.
User | Count |
---|---|
9 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
11 | |
3 | |
2 | |
2 | |
2 |