cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## % of specific status measure

Hi All,

Hope someone can help me with that. I'm trying to create measure which calculate % of total amount of ID's based on status (outstanding or completed). Unfortunately the way my data source is created I cannot figure out a way to do that.

Base on below data how to create % of Outstanding  to show as 75% ?

ID   Status

2     Outstanding

3     Close

4     Outstanding

6     Outstanding

I hope it make sense?

Thanks a lot!

5 REPLIES 5
Microsoft Employee

This should work as a measure

```Measure = DIVIDE(
CALCULATE(COUNTROWS('Table1')) ,
CALCULATE(COUNTROWS(all(Table1))
)```

Can probably do it as a calculated column if need too..

Proud to be a Datanaut!

New Member

Thank you so much for replying! I've just tried that and unfortunately it's doesn't work for me.

In the 'table1' you selecting whole table, correct?

Mine Measure looks like that - but I've might have made a mistake. Would you mind have a look?

Measure = DIVIDE(
CALCULATE(COUNTROWS('ALL_DATA_x')) ,
CALCULATE(COUNTROWS(all(ALL_DATA_x[Status] ))
))

Does this looks correct?

Thanks a lot

Community Champion

```Measure 1 =
DIVIDE (
COUNTROWS ( 'ALL_DATA_x' ),
CALCULATE ( COUNTROWS ( 'ALL_DATA_x' ), ALL ( 'ALL_DATA_x' ) ),
0
)

Measure 2 =
DIVIDE (
COUNTA ( 'ALL_DATA_x'[Status] ),
CALCULATE ( COUNTA ( 'ALL_DATA_x'[Status] ), ALL ( 'ALL_DATA_x' ) ),
0
)```

EDIT: You may change ALL to ALLSELECTED if necessary

New Member

Thank you so much for replying! I've just tried that and unfortunately it's doesn't work for me.

In the 'table1' you selecting whole table, correct?

Mine Measure looks like that - but I've might have made a mistake. Would you mind have a look?

Measure = DIVIDE(
CALCULATE(COUNTROWS('ALL_DATA_x')) ,
CALCULATE(COUNTROWS(all(ALL_DATA_x[Status] ))
))

Does this looks correct?

Thanks a lot

Microsoft Employee

Hi @mglatos,

You should add a filter in your measure. I try to reproduce using your given sample data.

If you want to calculate  % of Outstanding, please add ALL_DATA_x[Status]="Outstanding" filter, please review the following formula.

`Measure = DIVIDE(CALCULATE(COUNTROWS(Table5),FILTER(Table5,Table5[Status]="Outstanding")),CALCULATE(COUNTROWS(Table5),ALL(Table5)))`

Format the measure as %(highlighted in red line), and create a Card visual to dislay the result.

If you have other issues, please let me know.

Best Regards,
Angelia

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.