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 Power BI forums,
I've read a few solutions about this but can't seem to get this correct. I'm trying to create a custom bin based on a measure (see file attached). This is for a trading stock situation, where you have an entry then can have multiple exits (selling part of the position). The measure I created creates a weighted profit (i.e. one number) for per each entry. I want a histogram of the weighted profits by predefined bins (e.g. 0-5, 5-10%, etc).
I removed my attempts so you don't see the clutter, but I was trying:
-If statement is >min && <=Max
-I read a solution that used the Countrows then filter to the bins, there must be something off in my filter formulas, I keep messing with it.
My existing File:
https://www.dropbox.com/s/ydee6f7p788bk6e/Weighted%20Positions%20Custom%20Bins.pbix?dl=0
The one table I have that shows "Profit weight by trade", there could be another solution to restructure the measure. Thanks for the help in advance, it's a race to the solution!
Hi @Power_BI_Help ,
Sorry i don't quite understand what you want, can you show some details?
Below is an excel replicate of the table that I am trying to output based on the given input tables. I was able to calculate the weight profit if I am able to use the axis as trade ID, but then I am unable to bin them appropriately. I think I need a formula that "creates" the weighted profit X trade ID table in the background and then counts between the min and max of the "bin" table. I'm just struggling to create that in a DAX.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |