Forum Discussion
Need help with with tabel Power Query
- 1 year ago
Hi hansreivers TRy this
In Power Query, create a conditional column:
Margin = if [Article] = "x" then [Costprice] * 0.15 else 0In Power BI, add a calculated column:
TotalPrice = [Salesprice] + [Margin]Use a mapping table for dynamic updates, or a DAX measure:
DynamicMargin = IF(SELECTEDVALUE('Table'[Article]) = "x", SUM('Table'[Costprice]) * 0.15, 0)If this post helped please do give a kuods and accept this as a solution
Thanks In Advance - 1 year ago
Hi hansreivers Then you can add a log table with Article, Effective Date, and Increment columns. Load it into Power BI and create a dynamic margin measure using DAX:
DynamicMargin = VAR Increment = CALCULATE( MAX('LogTable'[Increment]), FILTER( 'LogTable', 'LogTable'[Article] = 'SalesTable'[Article] && 'LogTable'[Effective Date] <= 'SalesTable'[Date] ) ) RETURN 'SalesTable'[Costprice] * Increment
Hi hansreivers,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Vinay Pabbu
Hi @hansreivers,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Vinay Pabbu