Forum Discussion
Percentage
- 2 years ago
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/
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