Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi team, I need your help to calculate "GAP PRICE", this is divide the Price Value of one column value between the another value from same column
Solved! Go to Solution.
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.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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
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 Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi All
this is the solution I found:
thanks for your help
User | Count |
---|---|
122 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
189 | |
96 | |
67 | |
63 | |
53 |