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
Anonymous
Not applicable

needs % share in row wise

Hi

 

My data table looks like

 

id    status

1       a

2         a

3         a

4         a

5          a

6           a

7           b

8            b

9              c

10             c

 

 

I want to display below table in the report. Can u help me resolve this

 

status    # Count   %share

    a               5            50%

     b              2            20%

      c              2            20%

3 ACCEPTED SOLUTIONS
AlB
Community Champion
Community Champion

Hi @Anonymous 

 

Try this, where Table1 is the name of the first table you show:

 

1. Place Table1[status] in the rows of a matrix visual

2.  Create these two measures and place them in values of the matrix visual>Note the second measure uses the first one

 

MCount = COUNT(Table1[id])
MP%share = DIVIDE([MCount], CALCULATE([MCount], ALL(Table1)))

 

3.  Select [MP%share]  to be shown as percentage if required

View solution in original post

nandukrishnavs
Community Champion
Community Champion

1st Method

 

Assuming that your table name is "Table1".

 

create below DAX measure for the count.

 

#Count = 
CALCULATE ( COUNT ( Table1[Id] ) )

below DAX measure for the percentage.

 

%share = 
VAR c = [#Count]
VAR totalcount =
    CALCULATE ( COUNT ( Table1[Id] ), ALL ( Table1 ) )
VAR result = ( c / totalcount )
RETURN
    result

choose the table visual then add [status] column and both measures.

 

Change the format of "%share" as % in the modeling tab.

 

dax.PNG

 

2nd Method

 

  1. Choose table visual then add [status] column.
  2. again add [status] column and change its representation as count.
  3. repeat 2nd step and show value as  "percent of grant total"

 

Capture.PNGCapture1.PNG

You can rename the column headers if required. 

 


Regards,
Nandu Krishna

View solution in original post

Anonymous
Not applicable

4 REPLIES 4
nandukrishnavs
Community Champion
Community Champion

1st Method

 

Assuming that your table name is "Table1".

 

create below DAX measure for the count.

 

#Count = 
CALCULATE ( COUNT ( Table1[Id] ) )

below DAX measure for the percentage.

 

%share = 
VAR c = [#Count]
VAR totalcount =
    CALCULATE ( COUNT ( Table1[Id] ), ALL ( Table1 ) )
VAR result = ( c / totalcount )
RETURN
    result

choose the table visual then add [status] column and both measures.

 

Change the format of "%share" as % in the modeling tab.

 

dax.PNG

 

2nd Method

 

  1. Choose table visual then add [status] column.
  2. again add [status] column and change its representation as count.
  3. repeat 2nd step and show value as  "percent of grant total"

 

Capture.PNGCapture1.PNG

You can rename the column headers if required. 

 


Regards,
Nandu Krishna

Anonymous
Not applicable

Great!!!!!!!!!

AlB
Community Champion
Community Champion

Hi @Anonymous 

 

Try this, where Table1 is the name of the first table you show:

 

1. Place Table1[status] in the rows of a matrix visual

2.  Create these two measures and place them in values of the matrix visual>Note the second measure uses the first one

 

MCount = COUNT(Table1[id])
MP%share = DIVIDE([MCount], CALCULATE([MCount], ALL(Table1)))

 

3.  Select [MP%share]  to be shown as percentage if required

Anonymous
Not applicable

Thanks, its working

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors