Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

How would I get the results of the next day based on my selected date?

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:

CustomerEvent DateSales DateArticle
A15/8/201913/8/2019D
B16/8/201914/8/2019D
C 16/8/2019C

 

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.

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

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])))

 

How1.jpg

 

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.

View solution in original post

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

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.

v-zhenbw-msft
Community Support
Community Support

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])))

 

How1.jpg

 

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.

amitchandak
Super User
Super User

@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.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors