R Script & Power BI - Export Data to CSV file with specific formats

Hi all,

I have created a report and I need to export certain part after analysis aplied. I created an R Script which run each time I refresh the data. I'm pretty happy with the end result, but I would like to improve format of the export.

In my export I get Sequence (not needed), UserName (Needed), Date (bad format).


dataset <- data.frame(UserPrincipalName, Latest Usage, License Type, License Owner)

dataset <- unique(dataset)

Paste or type your script code here:

write.csv (dataset, file ="D:/Licenses/TelecomUserLicenseUsage.csv");

Can someone help me modify script to remove sequence column which is added automatically by R Script and change the date to this format - YYYY-MM-DD

Many thanks in advance

To get ride of the row names simply set row.names = FALSE in the write.csv() function, and to help you with the date format we would need some sample data or even better, a proper REPRoducible EXample (reprex) illustrating your issue.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.