Forum Discussion

Smithberg's avatar
Smithberg
Regular Visitor
9 years ago

PBI doesn't recognize currency from Google Analytics ( DataFormat.Error )

Hi,

 

I have connected to Google Analytics directly through PBI desktop.

 

(leaving some information as xxx)

When currency numbers are above 10million, they are formated as xxxE7, which PBI doesnt recognize.

 

Query:

#"Added Items" = Cube.Transform(#"xxx", {{Cube.AddAndExpandDimensionColumn, "ga:yearMonth", {"ga:yearMonth"}, {"Month of Year"}}, {Cube.AddMeasureColumn, "Revenue", "ga:transactionRevenue"}}),

Error code:

DataFormat.Error: We received unexpected data for a column of type 'Currency'.

Details:
1.xxxE8

 

I have tried changing region settings (current is swe, changed to various regions)

Tried Currency.From("ga:transactionRevenue","en-US") for example, then I get the error message "Couldn't convert to number"

 

Can't get this to work. Would really appreciate help!

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Smithberg,

    I am not able to reproduce your issue. In your scenario, firstly remove any “Change type” step for the ga:transactionRevenue in APPLIED STEPS. Then right click the ga:transactionRevenue column in Query Editor,  select “Change Type->Using Locale”, change the data type of the column to Decimal Number with English locale.



    After that, change the Format of the column to Currency under Modeling ribbon in report view of Power BI Desktop.


    Regards,
    Lydia Zhang

    • Smithberg's avatar
      Smithberg
      Regular Visitor

      Hi Lydia,

       

      I have tried to change locale and data types before, unfortunately the error persists.

      Before adding revenue (no errors)After revenue is addedAfter locale is changed

      Changing the locale doesn't change anything. Even with different region settings when I import the data!

      Do you have any other ideas? =)

       

      Regards,

      William

      • Anonymous's avatar
        Anonymous
        Not applicable

        Smithberg,

         

        Could you please post sample data of the Revenue column? I find a similar thread stating same issue, and Lina uses a different variable as a workaround.

        Reagrds,
        Lydia Zhang

  • Hi, 

     

    I´m experiencing the same error when importing data from GA to Power BI, has anyone get to the solution of this issue?? 

     

    Any help on this trouble or other way to avoid this kind of error with the currency type. 

     

    Thank you!

    • Smithberg's avatar
      Smithberg
      Regular Visitor

      I used a workaround:

       

      Use the revenue per user GA metric instead, which is formatted as a decimal number.

      Import ga:users as well

      Multiply users and revenue per user