Forum Discussion
Calculate Value to GAP Price
- 1 year ago
Hi All
this is the solution I found:
thanks for your help
Hi CMOLINA ,
This can be calculated forcing the filter context of the company level, my question is only if company 1 and company 2 are always the same or if they can change.
You can try something similar to this:
Price GAP = DIVIDE( SUM(Table[UnitPrice]), CALCULATE(SUM(Table[UnitPrice]), Table[Company] = "Company2"))
Be aware that as you can see I'm forcing the filter on the second one to be Company 2 so not dinamic and in the second column you highlight this would give 100% since you would be divinding the number by itself, but is possible to make it dinamic but you need to tell me how you want to have the companies selection.
Hi MFelix thanks for your answer
1. The name is always the same 🙂
2. I tried your suggestion but the value in column "Company 1" doesn't show
- Anonymous1 year agoNot applicable
Hi ALL,
Firstly MFelix thank you for your solution!
And CMOLINA ,When running in our example data, we can see that company1 can have a value in this place.If your Column 1 is not displaying normal values, it is possible that the metric is not displaying the values correctly under Company 1, as in my example below, which could cause an error in your Column 1.
Maybe I can't fully reproduce your problem due to my example data is too simple, may need to provide some example data or pbix file, we can better help you to solve this problem, if you still have further questions, you can contact us at any time, we will be the first time to reply to you after we receive your message, looking forward to your reply!
Hope it helps!
Best regards,
Community Support Team_ Tom ShenIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- CMOLINA1 year agoFrequent Visitor
Hi All
this is the solution I found:
thanks for your help