Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
I have the following problem:
We have a huge table of all our sales data. There is also a column for dates of a certain event which is not always filled. You can imagine the data like this:
Customer | Event Date | Sales Date | Article |
A | 15/8/2019 | 13/8/2019 | D |
B | 16/8/2019 | 14/8/2019 | D |
C | 16/8/2019 | C |
What I want to achive now is to see what customers bought on the day after the event. So when I look on the Event on the 15/8/2019, I would like to know, what products have been bought on the 16/8/2019 (Sales Date)
I hope that makes sense.
Solved! Go to Solution.
Hi @Anonymous ,
We create a sample and use the following measure to meet your requirement.
the next day =
var _current = MAX('Table'[Event Date])
var _nextday = _current + 1
return
CALCULATE(MAX('Table'[Article]),FILTER(ALLSELECTED('Table'),'Table'[Event Date]=_nextday && 'Table'[Customer] = MAX('Table'[Customer])))
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?
Could you please provide more details or expected result about it If it doesn't meet your requirement?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
We create a sample and use the following measure to meet your requirement.
the next day =
var _current = MAX('Table'[Event Date])
var _nextday = _current + 1
return
CALCULATE(MAX('Table'[Article]),FILTER(ALLSELECTED('Table'),'Table'[Event Date]=_nextday && 'Table'[Customer] = MAX('Table'[Customer])))
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous The information you have provided is not making the problem clear to me. Can you please explain with an example.
One of the formula as of now is if Event date is selected in slicer then you can have formula like
Measure =
Var _max = selectedvalue(Table[Event])
return
calculate(countrows(Table),filter(Table,Table[sales]= _max+1))
Appreciate your Kudos.