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.
I have a table with some customerIDs and e few orders per customer. Then I have an other table with some customerIDs (also not unique) and dates they received a mailing. Now I want to see the revenue the customer made in the 5 days after receiving the mailing. Maybe, I can do it in power query, in a calcualte column or in a measure. I'm not sure, what is the best. Here an example:
Any ideas?
Thanks, but it does not work, the results are empty. But I found an other solution.
Hi, @Broeselchen
According to your dexcription, you want to get the " the revenue the customer made in the 5 days after receiving the mailing".
I think you can create a calculated column in Power BI Desktop.
You can try to use this dax code:
Column = var cur_order_date = [order date]
var _t = FILTER('Table2' , 'Table2'[mailing date]<=cur_order_date && 'Table2'[mailing date] >=cur_order_date-5)
return
IF(COUNTROWS(_t)>0 , [revenue] ,BLANK())
Then we can meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
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 |
---|---|
105 | |
96 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |