cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Anonymous
Not applicable

## Percentage of two categories

Hello everyone,

I am having trouble showing the percentage of a percentage of a column. I have 2 columns "State" and "Iteration Path", once i filter the Iteration Path it shows how it suppose to with a 100% total, but when i try to filter again by State to show the percentage that i had before (for example, filtering closed sprint 9 instead of showing 38.30%, it shows a 100% total again). I tried taking the ALLSELECTED to ALL and it does not work, like it is shown in the images.

First images shows with ALLSELECTED, and the third image it shows with ALL.

ALLSELECTEDDAXALL insted of ALLSELECTED

1 ACCEPTED SOLUTION
Community Support

@Anonymous

If I understand your video correctly, you want it to auto calculate the % when filer to banana but what it to stop calculate when filter to B. Check the example below see if helps.

Yes % =
var yes = [Yes]
var sales= CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),[Sales]="Yes"&&'Table'[Fruit]=MAX([Fruit])))
Return yes/sales

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

5 REPLIES 5
Community Support

@Anonymous

If I understand your video correctly, you want it to auto calculate the % when filer to banana but what it to stop calculate when filter to B. Check the example below see if helps.

Yes % =
var yes = [Yes]
var sales= CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),[Sales]="Yes"&&'Table'[Fruit]=MAX([Fruit])))
Return yes/sales

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Super User

@Anonymous I cannot work with images and put my efforts to understand them. You can always create dummy data and explain it. If you cannot do this then unfortunately it is hard to provide a solution. Good luck.

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Video explaining the issue.

DAX

YES COUNT =
CALCULATE(COUNTROWS(Sheet1), Sheet1[Sales] = "YES")

YES % =
VAR Sale = [YES Sales]
VAR Currentsale = CALCULATE([YES Sales], ALLSELECTED(Sheet1))
RETURN
DIVIDE (Sale,Currentsale)

Super User

@Anonymous very hard to follow your images, can you share the sample data and explain what you are looking for?

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I cannot share the data since its confidential. So in this image we have a TOTAL percentage for Sprint 9, the percentage is divided by 3 "States", Active, Closed and New. This 3 show their percentage to make up for the TOTAL, which is okay. But then when i try to isolate for example "Closed" it does not show the 38.30% it showed before, instead it shows a 100%. So what i need is to be able to isolate those percentage numbers so i can show them in a card.

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors