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.
Hi,
I've been trying to find a solution for this and the closest solution that I got to was using EARLIER() which did not serve the purpose due to the (slightly) complex situation.
I have a table called Affiliates which appears like so, and what I'm trying to calculate is the master result, which is for this instance, the income multiplied by 0.5. This master commission should only apply to the master affiliates like so:
Affiliate| Income | Master | Master Commission John | 800 | Bruce | 0 (Not a master of anyone) Dave | 200 | Bruce | 0 (Not a master of anyone) Bruce | 1000 | Adam | 565 (800+200+130 multiplied by 0.5) (Master of John, Dave and Yves). Adam | 4000 | | 500 (1000 multiplied by 0.5) (Master of Bruce) Yves | 130 | Bruce | 0 (Not a master of anyone)
I'd appreciate some advice regarding on the calculation of this measure.
Thanks!
Solved! Go to Solution.
Hi @analystict
Try this for a new column on your table (Table1):
NewColumnMasterCommission = VAR _CurrentAffiliate = Table1[Affiliate] RETURN ( 1 / 2 ) * CALCULATE ( SUM ( Table1[Income] ), FILTER ( Table1, Table1[Master] = _CurrentAffiliate ) )
Hi @analystict,
If you'd like a measure, try this one.
Measure = CALCULATE ( SUM ( Table1[Income] ), FILTER ( ALL ( 'Table1' ), 'Table1'[Master] = MIN ( Table1[Affiliate] ) ) ) * 1 / 2
Best Regards,
Hi @analystict,
If you'd like a measure, try this one.
Measure = CALCULATE ( SUM ( Table1[Income] ), FILTER ( ALL ( 'Table1' ), 'Table1'[Master] = MIN ( Table1[Affiliate] ) ) ) * 1 / 2
Best Regards,
Did the trick, thank you 🙂
Hi @analystict
Try this for a new column on your table (Table1):
NewColumnMasterCommission = VAR _CurrentAffiliate = Table1[Affiliate] RETURN ( 1 / 2 ) * CALCULATE ( SUM ( Table1[Income] ), FILTER ( Table1, Table1[Master] = _CurrentAffiliate ) )
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |