Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
data_insights
Microsoft Employee
Microsoft Employee

Calculate percentages dynamically when filters are applied

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

 

ActionPlatformUserTypeNumUsers
SubscribeChromePaid10
SubscribeEdgeFree5
Click  HelpEdgePaid6
Click  HelpChromeFree5
Click  HelpFireFoxFree4
Click  HelpFireFoxPaid4
Search EdgeFree4
Search EdgePaid6
Search ChromeFree10

 

Table 2: Total Users

PlatformUserTypeTotalUsers
ChromePaid10
ChromeFree20
EdgePaid20
EdgeFree15
FireFoxPaid15
FireFoxFree 20

 

Any help is appreciated.

1 REPLY 1
DataInsights
Super User
Super User

@data_insights, see the data model below:

 

DataInsights_0-1599341898023.png

 

Create measure:

 

% Users = 
VAR vNumUsers = SUM ( UserActions[NumUsers] )
VAR vTotalUsers = SUM ( TotalUsers[TotalUsers] )
RETURN
DIVIDE ( vNumUsers, vTotalUsers )

 

Result:

 

DataInsights_1-1599341922934.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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