Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

user conversation rate with Dax

 

I am trying to calculate google analytics 4 user conversation rate with Dax

 

This is how it should be calculated 

  1. User conversion rate: the number of users who triggered a conversion event divided by the total number of users, times 100.

Can someone provide me with a dax sample PBI file which can help make these calculations and see the dax code used 

Example below

NameUsersUser Converstion rate
Green14,4963.05%
Purple12,9894.58%
Red8,0974.45%

 

Thanks

 

  • Your measure can be something like : 

     

    User Conversion Rate = 
    DIVIDE(
        SUM(YourTableName[Conversions]),
        SUM(YourTableName[Users]),
        0
    ) * 100

4 Replies

  • Your measure can be something like : 

     

    User Conversion Rate = 
    DIVIDE(
        SUM(YourTableName[Conversions]),
        SUM(YourTableName[Users]),
        0
    ) * 100
  • Anonymous's avatar
    Anonymous
    Not applicable

    AmiraBedh thanks for your help I will give it a go

    • Anonymous's avatar
      Anonymous
      Not applicable

      AmiraBedh if I put your code into a column what would the data type setting if I want decimals and %. 

       

      So right now i have my data in a column

      - Name = User Conversion rate

      - Data type =Decimal number

      - Format = Percentage

      - decimal place = 0

      Summarizarion = Sum

      Data Category = Uncategorized

       

      Using your dax code my calculations looks like this in my table

      Users - 98171

      User Conversation Rate 96649%

      Please can you help to point me in the right direction.

      Thanks

  • Hi Anonymous DAX is one way but since 2.0 connector is still in beta you can have some issues. As a workaround, you can try to test your connection with a 3rd party tool. I've tried windsor.ai, supemetrics and funnel.io. I stayed with Windsor because it is much cheaper so just to let you know about other options. In case you wonder, to make the connection first search for the GA4 connector in the data sources list:

     

     

    After that, just grant access to your GA4 account using your credentials, then on preview and destination page you will see a preview of your GA4 fields:

     

     

    There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.