Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello eveyone,
I'm deperating in solving this problem.
If do have a table and from this I need to calculate the average quote, but whenever I filter this table the quote gets wrong.
Example of my table:
Area | Weight Ordered | Weight Delivered | Type | Month | Quote |
1 | 12,3 | 12,3 | a | 2022-01 | 100,00% |
1 | 14,3 | 13,3 | a | 2022-02 | 93,01% |
1 | 16,3 | 16,3 | a | 2022-03 | 100,00% |
1 | 18,3 | 18,3 | a | 2022-04 | 100,00% |
3 | 20,3 | 20,3 | a | 2022-01 | 100,00% |
3 | 22,3 | 21,3 | a | 2022-02 | 95,52% |
3 | 24,3 | 24,3 | a | 2022-03 | 100,00% |
3 | 26,3 | 26,3 | a | 2022-04 | 100,00% |
3 | 28,3 | 28,3 | a | 2022-03 | 100,00% |
3 | 30,3 | 25,4 | b | 2022-02 | 83,83% |
5 | 32,3 | 32,3 | b | 2022-01 | 100,00% |
5 | 34,3 | 34,3 | b | 2022-02 | 100,00% |
5 | 36,3 | 36,3 | b | 2022-03 | 100,00% |
5 | 38,3 | 38,3 | b | 2022-04 | 100,00% |
5 | 40,3 | 0 | b | 2022-03 | 0,00% |
5 | 42,3 | 42,3 | b | 2022-03 | 100,00% |
5 | 44,3 | 47,2 | c | 2022-02 | 106,55% |
5 | 46,3 | 48,23 | c | 2022-01 | 104,17% |
7 | 48,3 | 22,5 | c | 2022-01 | 46,58% |
7 | 50,3 | 48,6 | c | 2022-02 | 96,62% |
7 | 52,3 | 50,2 | c | 2022-03 | 95,98% |
7 | 54,3 | 54,3 | c | 2022-04 | 100,00% |
9 | 56,3 | 56,3 | c | 2022-01 | 100,00% |
As Power BI Desktop translated my Month field to a date field I created a new column with the following:
I want to display the values in a graph and therefore I created a new file and added a graph visual.
In the image you will see that the weight ordered has a value of 240,10 and the weight delivered has 197,70. Therefore the value of the quote should be: 197,70 / 240,10 = 82,34 %, but the display says 85,14%.
I know what does Power BI does here and it calculate every single line and after that it calculates the quote field. I set the displayof the quote to SUM and AVERAGE, but in any case I do not get the correct value of 82,34%.
It becomes more and more difficult as there should be some filtering done as well. As shown in the example berlow.
These is only an example, but I guess it show my problem and hope one of you can help me with this.
Thanks a lot in advance.
Johannes Dobler
Solved! Go to Solution.
Hi @jdobler
You need to create a measure to calculate the percentage. The measure also works well when you add filters to the report.
Quote % = DIVIDE(SUM('Table (2)'[Weight Delivered]),SUM('Table (2)'[Weight Ordered]))
I have attached a sample file at bottom.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @jdobler
You need to create a measure to calculate the percentage. The measure also works well when you add filters to the report.
Quote % = DIVIDE(SUM('Table (2)'[Weight Delivered]),SUM('Table (2)'[Weight Ordered]))
I have attached a sample file at bottom.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
116 | |
104 | |
87 | |
35 | |
35 |
User | Count |
---|---|
152 | |
98 | |
81 | |
61 | |
55 |