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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Table visual - Percentage of the total value

Hi I have a table which I would like to do the following: counta(numObjects) divided by counta(all objects. my table looks like this Band      numObjects      %
a           10                     10%
b          20                      20%
c           70                      70%
total =100                      100%
I did a workaround by calculating the max numObjects/Total (but then the 100% shows as 70% because it is getting the max value.
Going crazy 🙂

Jo

 

also will answer appear in my inbox or do i have to come back to this page to get the answer?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi I worked around your formula:

This worked 🙂

 

Percent GT = DIVIDE (COUNTA (Sheet1 [ProjUserFormID]),CALCULATE (COUNTA (' Sheet1 ' [ProjUserFormID]), ALLSELECTED (' Sheet1 ' [HRECBAND1])))

Thank you

 

Jo

 

View solution in original post

4 REPLIES 4
AllisonKennedy
Super User
Super User

PS
Answer should appear in your inbox for any thread you subscribe to. You should automatically be subscribed to the threads you post. You only need to come back to Community Forum to let us know if it is actually the solution.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

AllisonKennedy
Super User
Super User

@Anonymous
I would suggest you try this as a calculated MEASURE:

Percent GT = DIVIDE(COUNTA(table[numObjects]), CALCULATE(COUNTAtable[numObjects]), ALL())

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

Hi
this is what I did to get my values (agree with the pie chart) - Percent GT gives me odd values.
Already
Percent3 = divide(Sheet1[Percent2],Sheet1[Percent1])
Percent2 =MAXX( KEEPFILTERS(VALUES('Sheet1'[HRECBAND1])), CALCULATE(COUNTA('Sheet1'[ProjUserFormID])))
Percent1 =CALCULATE (COUNTA (' Sheet1 ' [ProjUserFormID]), ALLSELECTED (' Sheet1 ' [HRECBAND1]))
Percent GT = DIVIDE (COUNTA (Sheet1 [ProjUserFormID]), CALCULATE (COUNTA (Sheet1 [ProjUserFormID]), ALL ()))

Capture1.JPG

Anonymous
Not applicable

Hi I worked around your formula:

This worked 🙂

 

Percent GT = DIVIDE (COUNTA (Sheet1 [ProjUserFormID]),CALCULATE (COUNTA (' Sheet1 ' [ProjUserFormID]), ALLSELECTED (' Sheet1 ' [HRECBAND1])))

Thank you

 

Jo

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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