Forum Discussion
conditional formatting in Service Mode
Hi,
After my test, it works well on my Power BI Service.
Here is my test table and measure:
Measure = IF(SELECTEDVALUE('Table'[Time])<=2,"Last GT within 2 min","Last GT over 2 min")Create a color measure, then set its conditional format and choose a table visual:
Color = IF([Measure]="Last GT within 2 min","#FF0000","#00FF00")The result shows:
After publishing to Power BI Service, it shows well:
So, for your problem, please share your conditional format setting with me by screenshot.
And please tell me the visual you used for me to find the solution as soon as possible.
Best Regards,
Giotto Zhi
- martijnth6 years agoHelper II
Dear Giotto, thx for taking the time to support me!
Funny you mention, because the same happens here, when ever I publish all in one matrix works. However in then separate Cards it is not.
This is code used in the cards:
Min.SinceLastGT = IF((DATEDIFF(MAX(TBM_PRODUCTION_DATA[ProducedOn]),now(),MINUTE)<4),"Last GT within 2 min.",CONCATENATE(CONCATENATE("Last GT ",DATEDIFF(MAX(TBM_PRODUCTION_DATA[ProducedOn]),now(),MINUTE))," Min. ago"))Formatting happens with(deliberately split measures for all machines, otherwise even in desktop not working):Last GT tbm1 = CALCULATE(DATEDIFF(MAX(TBM_PRODUCTION_DATA[ProducedOn]),now(),MINUTE),Filter(TBM_PRODUCTION_DATA,TBM_PRODUCTION_DATA[EquipmentID]="TBM 1"))in:- v-gizhi-msft6 years agoCommunity Support
Hi,
After my much test, i seem to find the key point of problem, it is due to different calculation of current time by time zone on Power BI Desktop and Power BI Service.
When you refresh dataset on Power BI Service, it displays the different time:
So in this case, you should not use NOW() dax expression but give a sepcific time you want.
Best Regards,
Giotto Zhi
- martijnth6 years agoHelper II
Hi Giotto,
thanks for your support, not sure how to capture the current time with using something like NOW() or UTCNOW(). How would you do this?
reg martijn