Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have two tables, I want to calculate percentage users using NumUsers from Table 1 and Totalusers from Table 2.
I want to show , Percentage users who performed an action based on the Platform and usertype combination . Platform and UserType will be slicers and the percentage has to change based on filters applied.
Example : Percentage of Users who clicked on "Subscribe" should be 10/10 (NumUsers from row 1 of table 1)/ (Chrome Paid TotalUsers) instead of 10/100 (Numusers from row1 of table1/ Totalusers across all platforms and usertypes).
I tried merging the platform and usertype columns to create a relationship between the two tables but that did not work as expected.
Table 1: UserActions
Action | Platform | UserType | NumUsers |
Subscribe | Chrome | Paid | 10 |
Subscribe | Edge | Free | 5 |
Click Help | Edge | Paid | 6 |
Click Help | Chrome | Free | 5 |
Click Help | FireFox | Free | 4 |
Click Help | FireFox | Paid | 4 |
Search | Edge | Free | 4 |
Search | Edge | Paid | 6 |
Search | Chrome | Free | 10 |
Table 2: Total Users
Platform | UserType | TotalUsers |
Chrome | Paid | 10 |
Chrome | Free | 20 |
Edge | Paid | 20 |
Edge | Free | 15 |
FireFox | Paid | 15 |
FireFox | Free | 20 |
Any help is appreciated.
@data_insights, see the data model below:
Create measure:
% Users =
VAR vNumUsers = SUM ( UserActions[NumUsers] )
VAR vTotalUsers = SUM ( TotalUsers[TotalUsers] )
RETURN
DIVIDE ( vNumUsers, vTotalUsers )
Result:
Proud to be a Super User!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
21 | |
20 | |
19 | |
13 | |
12 |
User | Count |
---|---|
41 | |
27 | |
23 | |
22 | |
22 |