Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good day everyone.
I need to ask you for help with a calculated metric that I want to implement in a report.
The objective is to show the total amount of invoices and the percentage of participation they represent over the total, according to the rate that the user chooses.
The tables that would intervene are FACT_TABLE, DIM_TIEMPO, DIM_TARIFA.
I'm telling you an example:
For the month of January the total of Invoices is 200mil and the percentage of participation is 100% because it is not filtered by any fee.
Ej2:
In this case if the user filters a specific rate (e.g. rate 10), the metric returns the percentage that represents those invoices of tariff 10 on the total invoices of the month (seen in the image above).
The first thing I thought about is putting together the percentage calculation in two parts:
1- first calculating the total invoices, using the REMOVEFILTERS function, so that it ignores the TARIFF filter.
2- create a second metric that does the percentage calculation using the result of the previous metric.
HOWEVER. the REMOVEFILTER would not be working as expected.
Solved! Go to Solution.
https://blog.enterprisedna.co/finding-the-percent-of-total-in-power-bi/
https://www.analytics-tuts.com/percentage-of-total-using-dax-in-powerbi/
I dont know spanish, used auto-translate
if these links dont help, sorry!
Hi @Syndicate_Admin ,
Maybe I understand the results you want.You could create a measure like below:
Measure =
var total = CALCULATE(SUM(financials[ Sales]),ALLSELECTED(financials[Segment]))
return DIVIDE(SUM(financials[ Sales]),total)
I created a sample pbix for your reference.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
https://blog.enterprisedna.co/finding-the-percent-of-total-in-power-bi/
https://www.analytics-tuts.com/percentage-of-total-using-dax-in-powerbi/
I dont know spanish, used auto-translate
if these links dont help, sorry!
Lot of info here... Thank you!.
At the end I used the funcion REMOVEFILTER to be able to remove only ONE filter from the context of the calculation. But it helped me to understand how the ALL() dax function works.
Thank you very much!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |