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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors