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.
Hope this makes sense!
I have a date dim and a table- lets call it sales.
Sales table has an active relationship on sales date and an inactive relationship on refund date.
I have a sum of sales and I also have a sum of refunds ( by using USERELATIONSHIP ). If I drop them on a chart where my axis is just date from date dim I get a perfect view of the value of sales and refunds (all refunds are negative values) by month.
I've been asked to take away refunds from sales values to get a true sales value figure.
Is this even possible? I did try taking simply one away from another but it did not work as expected.
Examples:
True Sales = [Sales Value] - [Refunded Values]
Thanks,
Kasia
Solved! Go to Solution.
Hey @amitchandak thanks for your solution. I looked at it with fresh pair of eyes today. I was making THE most silly mistake ever of doing this True Sales = [Sales Value] - [Refunded Values] where it should have been True Sales = [Sales Value] + [Refunded Values]
As refund values were negative so -1500, -500, -5478 I needed them added to sales value so that it would actually take them away.
@kasiaw29 , Try like
CALCULATE(
SUM('Sales'[Total Gbp]),
filter('Sales','Sales'[Transaction Code] = "REFUND" && not(isblank('Sales'[Refunded Date]))),
USERELATIONSHIP(DateDim[Date],'Sales'[Refunded Date]))
or
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hey @amitchandak thanks for your solution. I looked at it with fresh pair of eyes today. I was making THE most silly mistake ever of doing this True Sales = [Sales Value] - [Refunded Values] where it should have been True Sales = [Sales Value] + [Refunded Values]
As refund values were negative so -1500, -500, -5478 I needed them added to sales value so that it would actually take them away.
Hi @kasiaw29 ,
Sorry I'm a little confused about your request,is your issue solved now?If not,could you pls share some sample data with expected output for test?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |