Forum Discussion
Total Sales Payment
Hi Everyone...
I have a total of sales and I have a reference table with the range to calculate the payment for total sales. I use this calculated formula, but I think is no the best way, and I want to use ref_table.
Example:
REF_PAYMENT_TABLE
- This should give you what you are looking for...Lookup_Value = CALCULATE( VALUES( 'Table (5)'[Value] ), FILTER('Table (5)', 'Table (6)'[Sales#] >= 'Table (5)'[From] && 'Table (6)'[Sales#] <= 'Table (5)'[To]))
3 Replies
- fhillResident RockstarThis should give you what you are looking for...Lookup_Value = CALCULATE( VALUES( 'Table (5)'[Value] ), FILTER('Table (5)', 'Table (6)'[Sales#] >= 'Table (5)'[From] && 'Table (6)'[Sales#] <= 'Table (5)'[To]))
- SQUILESHelper I
may not mention it, Sale# come from a count. The original data is SaleName and a DATE of the Sales.
With you calculate formula I don't have a Total at the end of the column.
- parry2kSuper User
SQUILES add new column using following DAX:
Column = VAR __sales = 'Table'[Sales] RETURN CALCULATE ( MIN ( Range[Amount] ), __sales >= Range[Min], __sales <= Range[Max] )✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡