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.
I'm using the R script editor to make some custom visualizations in a PBI report and I'm wondering if it's possible to add PBI measures to the dataframe that you make in the R script - i.e., so my resulting data frame would be one row long and every column would be the value of a different DAX-calculated measure. I've tried to do this with a simple measure (a proportion) but when I display the value on my R visualization it appears to be gibberish numbers.
Are measures something that you can incorporate into this kind of thing, or would you need to calculate them again within the R script?
Solved! Go to Solution.
Hi @jd_87
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 @jd_87
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 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
96 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |