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.
Hello,
I want to find the cumulative percentage of the purchases made to suppliers.
I have a measure that calculates the total purchases by supplier :
However, with this way of doing things, the cumulation is done by the alphabetic supplier name and not by the total amount of purchases.
Can you please help me to make the cumulation by the total amount of purchases by supplier ?
Thank you in advance.
AlBers
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
You can cumulative by the supplier or by time. Not very clear what you want
for time you could have done like Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
Thank you for your answer @amitchandak !
I want to cumulate by the column (measure) Product Purchases.
But since it's a measure, I cannot use the MAX() function as you say...
hi @Anonymous
Just adjust the formula as below:
Cumulative Percentage =
var sales=CALCULATE(SUM('All'[Valeur CHF]),FILTER(ALLSELECTED('All'),'All'[Valeur CHF]<=SUM('All'[Valeur CHF])))
var totalsales=CALCULATE(SUM('All'[Valeur CHF]),ALLSELECTED('All'))
return
DIVIDE(sales,totalsales)
Regards,
Lin
Hello @v-lili6-msft,
Thank you for your answer.
But your formula gives me the following case:
It seems like the cumulation is made in the wrong direction and that the percentage is wrongly calculated ...
hi @Anonymous
If so, just adjust the formula as below:
Cumulative Percentage =
var sales=CALCULATE(SUM('All'[Valeur CHF]),FILTER(ALLSELECTED('All'),'All'[Valeur CHF]>=SUM('All'[Valeur CHF])))
var totalsales=CALCULATE(SUM('All'[Valeur CHF]),ALLSELECTED('All'))
return
DIVIDE(sales,totalsales)
Regards,
Lin
Hello @v-lili6-msft,
It still doesn't work ("Cumulative Percentage 2") ...
Maybe we have to use a measure like this one :
Product Purchases = SUMX(VALUES('All'[Nom fournisseur]),CALCULATE(SUM('All'[Valeur CHF])))
Used to calculate the sum of purchases values by supplier.
Thanks a lot ! Best regards !
Hi,
Share the link from where i can download your PBI file.
Hello @Ashish_Mathur and @v-lili6-msft,
Thank you for your answers !
Here is the sample pbix file : https://we.tl/t-lmOY1iuUBz
The two actual solutions give a wrong result ...
Best regards
Hi,
You may download my PBI file from here.
Hope this helps.
You are welcome. If my reply helped, please mark it as Answer.
hi @Anonymous
If possible, could you please share your sample pbix file for us have a test? that will be a great help.
Regards,
Lin
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |