nhs-r-community / NHSRplotthedots

An SPC package to support NHSE/I 'Making Data Count' programme
https://nhs-r-community.github.io/NHSRplotthedots/
Other
47 stars 22 forks source link

Running code in Power BI R-Visual #145

Closed MartinRabbetts closed 2 years ago

MartinRabbetts commented 2 years ago

I've been trying to get the code working in Power BI but not very experienced with R. I can get it to work in RStudio with the same data but when trying to copy it across to Power BI R Visual it tells me my date field is a character (it isn't). Even when I try and add in some transformation code to force the date field to be a date it gives me the same error (I may not have got that bit right though). Anyone had similar problems or experienced enough in R to help would be very grateful.

MartinRabbetts commented 2 years ago

Scrap that I've got it working now. Even though Power BI recognises the field as a date, when I bring it in to the R Visual it was resetting it to character and my lack of R skill meant I wasn't transforming it back to a date format correctly but a bit of Googling got me there. I now have what seems to be a working Plot the Dots SPC chart in Power BI that interacts with slicers and other visuals which is just what I was looking for

ThomUK commented 2 years ago

Great news, good work. Thanks for broadening the family to PowerBI. #thumbsup