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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Pucca121
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
v-yulgu-msft
Employee
Employee

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.

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 🙂

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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