Forum Discussion
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
- 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
| Name | Users | User Converstion rate |
| Green | 14,496 | 3.05% |
| Purple | 12,989 | 4.58% |
| Red | 8,097 | 4.45% |
Thanks
Your measure can be something like :
User Conversion Rate = DIVIDE( SUM(YourTableName[Conversions]), SUM(YourTableName[Users]), 0 ) * 100
4 Replies
- AmiraBedh
Super User
Your measure can be something like :
User Conversion Rate = DIVIDE( SUM(YourTableName[Conversions]), SUM(YourTableName[Users]), 0 ) * 100 - AnonymousNot applicable
AmiraBedh thanks for your help I will give it a go
- AnonymousNot 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
- CoderZen08
Helper V
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.