Forum Discussion
R scripting visualizations using DAX measures - is it possible?
- Anonymous2 years ago
Hi Anonymous
Only data frames are imported to the R, remember to represent the data you want to import to Power BI in a data frame, you need to calculate them again within R script, the language of measure cannot support in R script., you can refer to the following link.
https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-r-scripts#prepare-an-r-script
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Only data frames are imported to the R, remember to represent the data you want to import to Power BI in a data frame, you need to calculate them again within R script, the language of measure cannot support in R script., you can refer to the following link.
https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-r-scripts#prepare-an-r-script
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
So, I've given this another shot, and it actually seems like you CAN work with measures in R - at least as long as the dataframe you're making in R is just a collection of measures.
For instance, if I add a series of PBI measures to my R visual, I can refer to them each individually (e.g., dataset[1,1], dataset[1,2], etc.), which is what I want. I'm not sure why the numbers weren't displaying correctly when I tried this the first time, but it seems to be working fine now 🙂