The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
So I have a table of data which contains times. I want the table of times to display a background colour behind the value as either Red, Amber or Green. It will work as follows.
00:00:00 > <= 00:20:00 = Green
00:20:00 > <= 00:22:00 = Amber
Anything greater than 00:22:00 = Red
I want to set colours through the conditional formating tool to show the above. Conditional formating values on Power BI seem to only work as a numerical value or percentage. As time is neither of these, i am unable to do conditional formating.
Can anybody suggest a way in which this can be done please?
@ghoshabhijeet @GH this is what I am trying to do, see attached screenshot of power bi data table, also see attached key for RAG colours, please can you help?
Hi @alexw94 ,
Power BI has a formula that is time you can create something similar to this:
Color =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table (3)'[Time] ) > TIME ( 0, 0, 0 )
&& SELECTEDVALUE ( 'Table (3)'[Time] ) <= TIME ( 0, 20, 0 ), "#4CAF50",
SELECTEDVALUE ( 'Table (3)'[Time] ) > TIME ( 0, 20, 0 )
&& SELECTEDVALUE ( 'Table (3)'[Time] ) <= TIME ( 0, 22, 0 ), "#FFC107",
SELECTEDVALUE ( 'Table (3)'[Time] ) > TIME ( 0, 22, 0 ), "#F44336"
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIs this a measure what you have created? If so, the measure is not picking up the time values in my data table, the time values I have in my data table are from another measure.
I will try, it will be difficult.
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
203 | |
82 | |
65 | |
48 | |
38 |