cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

When a select a day, it returns me the sales informations of the day after

Hello!

 

I have an issue with time. When a select a day, it returns me the sales informations of the day after.  So, I tried to fix this changing the calendar hour, and put it 3 hours after midnignt, but it doesn't work.

 

I have these TIME formulas:

 

Calendrier

= CALENDARAUTO()

 

Salesday

 = CALCULATE(SUM(Calendrier[Is Working Day]);DATESBETWEEN(Calendrier[Date];RELATED('Data Mailing'[Date premiere vente]); Set[datedecredit]))

 

Is Working Day

= SWITCH(WEEKDAY(Calendrier[Date]);7;0;1;0;1)

 

I also have a date in a table. In fact,  each sale has a row with a date. Is the query, it's a date but without hour.

 

Can you help me please??  Smiley Happy

 

P.

 

3 REPLIES 3
Highlighted
Microsoft
Microsoft

Re: When a select a day, it returns me the sales informations of the day after

Hi @Pucca121,

 

According to current description, it's not very clear about your requirement. Please share some sample data to show us the table structure of all necessary tables you mentioned above. Also, please elaborate your desired output with more detailed information, if you can post an image would be better.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: When a select a day, it returns me the sales informations of the day after

hello,

 

So, the problem is the next one. When I select Jourcampagne, for example 3, date de crédit (30 november 2016)  is correct, but the information about recettes cumulées (13,5K), matches to the 31 november 2016, the day after.

 

 

demo.PNG

 

 

 

Here you can see my sales data. In this table, I put also the calculated column JourCampagne

 

Jourcampagne = CALCULATE(SUM(Calendrier[Is Working Day]);DATESBETWEEN(Calendrier[Date];RELATED('Data Mailing'[Date du premier don]); sword_donSet[sword_datedecredit]))

 

salestable.PNG

 

And here, my calendar.

 

 

calendar.PNG

Thank you for your help 🙂

Highlighted
Microsoft
Microsoft

Re: When a select a day, it returns me the sales informations of the day after

Hi @Pucca121,

 

Based on my test, DATESBETWEEN returns correct date range. I didn't encounter your problem that the returned rows match to the day after specified end date. In your scenario, please check whether the end date part in DatesBetween returns the correct date.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors