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.

Reply
farah2016
Frequent Visitor

Log transformation of variables

Hey guys I am trying to use log to transform one of my variables. I have done this in R previoulsy:

m5$logv1 <- log(m5$v1)

 

Any suggestions re: how I can accomplish this ? I thought I could do it directly using R script through the Query Editor but It doesn't recognize m5 as my object name. 

 

Caution- very new to power bi.

 

Thanks!

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

Not sure what you m5 is, is that a data frame or something? In any event, in R Script, usually "dataset" holds your data frame. Also, not sure why you would need to use R to transform your data, M has Number.Log and Number.Log10 functions and DAX has LOG and LOG10 functions.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

m5 is the dataset. And just figured out how I can log each column through the Scientific transformation under Add Column ribbon. 

 

Thanks!

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Not sure what you m5 is, is that a data frame or something? In any event, in R Script, usually "dataset" holds your data frame. Also, not sure why you would need to use R to transform your data, M has Number.Log and Number.Log10 functions and DAX has LOG and LOG10 functions.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

m5 is the dataset. And just figured out how I can log each column through the Scientific transformation under Add Column ribbon. 

 

Thanks!

Hi @farah2016,

 

According to your description, it seems that you find the solution, right? If that is a case, would you please mark a helpful reply as an answer to close the thread? If not, please feel free to let me know.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.