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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
InsightSeeker
Helper III
Helper III

Measure %

How can i create a measure to get the result as shown in the below table? I don't want to use show value as % of grand total.

 

Table

Mode
Online
Offline
Online
Online
Online
Offline
Offline
Offline
Offline
Offline

 

Result

ModeCount
Online4
Offline6
  
ModePercentage
Online40%
Offline60%
2 ACCEPTED SOLUTIONS
Kishore_KVN
Super User
Super User

Hello @InsightSeeker ,

You have to create a measure for the same as below:

Percentage Contribution = 
Var A = COUNTA('Table'[Mode])
Var B = CALCULATE(COUNTA('Table'[Mode]),ALL('Table'))
Return
DIVIDE(A,B,0)

Output looks like this:

Kishore_KVN_0-1713446267975.png

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

 

 

View solution in original post

PhilipTreacy
Super User
Super User

Hi @InsightSeeker 

 

To get the % of Offline/Online use this

 

% = DIVIDE(CALCULATE(COUNTROWS('DataTable'), 'DataTable'[Mode] = SELECTEDVALUE('DataTable'[Mode])), CALCULATE(COUNTROWS(ALL('DataTable'))))

 

offon.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @InsightSeeker 

 

To get the % of Offline/Online use this

 

% = DIVIDE(CALCULATE(COUNTROWS('DataTable'), 'DataTable'[Mode] = SELECTEDVALUE('DataTable'[Mode])), CALCULATE(COUNTROWS(ALL('DataTable'))))

 

offon.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Kishore_KVN
Super User
Super User

Hello @InsightSeeker ,

You have to create a measure for the same as below:

Percentage Contribution = 
Var A = COUNTA('Table'[Mode])
Var B = CALCULATE(COUNTA('Table'[Mode]),ALL('Table'))
Return
DIVIDE(A,B,0)

Output looks like this:

Kishore_KVN_0-1713446267975.png

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

 

 

Attached PBIX for reference. 

samratpbi
Super User
Super User

Hi, you can create a measure to count rows for each mode.

Cnt = COUNTROWS(tablename)
Below is the output:
samratpbi_0-1713446170435.png

In the table, the mode column & the cnt measure used.

 

If this resolves your problem, then please mark it as solution, Thanks!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors