Skip to main content
cancel
Showing results for 
Search instead 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

Reply
MachisukiJ
Helper I
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 .

MachisukiJ_0-1681222886615.png

since now thanks for your help !! 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @MachisukiJ 

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"}
)
 

View solution in original post

4 REPLIES 4
FreemanZ
Super User
Super User

hi @MachisukiJ 

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"}
)
 

thank you really much for your help !!!

Rudy_D
Resolver I
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

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

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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