Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Conditional formatting error

The text is in Finnish, but the logic is quite simple. On bottom left there's a list of all the rooms and on the next column there's information whether the room is empty or occupied. In order to to add coloring to it, I used conditional formatting: zero for empty room is colored green and otherwise the color is red. All the rooms except 209 get the color right. For some reason room 209 is colored wrongly red - eventhough tila is "vapaa" and has the value of 0. So only the color is wrong. And when I copy paste this graph to a new page room 209 is displayed green. So I'm guessing this is a bug?

 

In this picture you can also see on bottom right how the conditional logic is made up: 0 is green.

904_väri.PNG

Status: New
Comments
GoingIncognito
Advocate III

Lastly to provide all the infromation here's the sql that produces values for 0/1 (these form the rules for the logic ) as well as Vapaa/Varattu (colored as green/red):

 

Create view dbo.vw_rooms2 as
with cte as (
select 
rank() over (partition by room order by timestamp desc ) as maxtimerank,
room 
,occupancy
,timestamp
from vw_lora_final_5)
select 
case when CTE.occupancy = 1
then 'Varattu' Else 'Vapaa' end as 'Huoneen tila',
case when CTE.occupancy = 1
then 1 Else 0 end as 'Huoneen tila numerona',
di.room, di.floor from device_instance di
left join cte on di.room = cte.room 
where MAXTIMERANK = 1 
group by di.room, di.floor, cte.occupancy

v-qiuyu-msft
Community Support

Hi @GoingIncognito

 

Please click on the Refresh button to see if the issue still occurs. 

Also please update Power BI desktop to the latest version 2.70.5494.761 then reopen the report. 

 

Best Regards,
Qiuyun Yu 

GoingIncognito
Advocate III

Thanks for the tips.

I always run the newest version. And the problem is recurring.

v-qiuyu-msft
Community Support

Hi @GoingIncognito

 

Is it possible for you to share the pbix file with us? If it is, please remove sensitive data then upload the pbix file o your OneDrive, send the share link to me via private message. 

 

Best Regards,
Qiuyun Yu

GoingIncognito
Advocate III

Thank you. I will send the file to you.