The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
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/
Proud to be a Super User!
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
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/
Proud to be a Super User!
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |