Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Franlea2008
New Member

Percentage

Good Morning

I have recently started using power BI. I have been reporting for a while but only using excel. I have spent alot of time watching U tube videos and am gradully learning. I have recently started learning percentages however although it works it isnt the way I'd like it to and I am struggling to find the answer.

It works as in it takes a total of all the data however when I filter by month/year or department the bar chart still seems to be counting all the lines rather than just the specific lines that are selected for the year/ department.

 

Can anybody reacommend a dax/formula (not sure of the correct term I'm very new or a u tube video that I could follow to do this?

 

Thank you in advance 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

It sounds like the filter context is not behaving as you would assume. I recommend cheking out these articles:

Row Context and Filter Context in DAX - SQLBI
Introducing CALCULATE in DAX - SQLBI


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Franlea2008 ,

Base on your description, it seems like you want to get the dynamic percentage base on the selected year or department. You can create a measure as below to get the percentage:

Department Sales % =
DIVIDE (
    SUM ( Sales[Amount] ),
    CALCULATE ( SUM ( Sales[Amount] ), ALL ( Sales ) )
)

In addition, you can refer the following links to get the percentage.

How to Calculate Percentage of Total in Power BI 

powerbi - Power BI Measure to calculate percentage which changes with filters 

APPTS % of Selected = DIVIDE ( [Total APPTS], CALCULATE ( [Total APPTS], ALLSELECTED () ) )

Best Regards

ValtteriN
Super User
Super User

Hi,

It sounds like the filter context is not behaving as you would assume. I recommend cheking out these articles:

Row Context and Filter Context in DAX - SQLBI
Introducing CALCULATE in DAX - SQLBI


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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