cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## i need to take the results of the entire table by using an text column as the base

good morning to y'all, i need help to discover if is there a way to remove an specific value out of an column to be able to filter what will be counted, it is an time based calculation that will be turned into an percentage graph, but in order to get there i need to filter two diferent results, the first being the percentage of co orders and the second result the sum of cp,pr and ou, the example print is right there .

since now thanks for your help !!

1 ACCEPTED SOLUTION
Super User

try like:

percentage of co =
DIVIDE(
CALCULATE(
SUM(TableName[Value]),
TableName[TIP]="CO"
),
CALCULATE(
SUM(TableName[Value]),
ALL(TableName[TIP])
)
)

sum of cp pr and ou =
CALCULATE(
SUM(TableName[Value]),
TableName[TIP] IN {"cp", "pr", "ou"}
)

4 REPLIES 4
Super User

try like:

percentage of co =
DIVIDE(
CALCULATE(
SUM(TableName[Value]),
TableName[TIP]="CO"
),
CALCULATE(
SUM(TableName[Value]),
ALL(TableName[TIP])
)
)

sum of cp pr and ou =
CALCULATE(
SUM(TableName[Value]),
TableName[TIP] IN {"cp", "pr", "ou"}
)

Helper I

thank you really much for your help !!!

Resolver I

Hi,

To obtain both results, you can use the measures below. I assume that you table is called 'Table'.

You have to convert the first one in %.

measure 1 = DIVIDE(CALCULATE(COUNT('Table'[TIPO O.S]), FILTER('Table', 'Table'[TIPO O.S] = "CO")), COUNT('Table'[TIPO O.S]), 0)

measure 2 = CALCULATE(COUNT('Table'[TIPO O.S]), FILTER('Table', 'Table'[TIPO O.S] = "CP" || 'Table'[TIPO O.S] = "PR" || 'Table'[TIPO O.S] = "OU"))

Tell me if it's ok for you.

Rudy
Helper I

your measures worked pretty well, the result diverted just a little bit from what it should be, thank you really much !!

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors