2 Replies Latest reply on Jul 20, 2019 9:31 AM by pratik.chaudhary

# Caluclation of sales of the previous day

Hello everyone,

I would like to ask for your help to create a caluclation. I have the number of order of each day, but not the numb of sales. I already created with "Quick table calculation" the difference with the previous day, which it gives me the sales of the previous day.( ex, if i order otday 373 , and tomorrow 609 articles, I know that  yetsrday I sold 272 articles.

many thanks to who can help me with this, attached the tableau with datset

have anice week end

Best,

Elia

• ###### 1. Re: Caluclation of sales of the previous day

Hi Elia,

Not sure but find my approach as reference below and stored in attached workbook version 10.5 located in your original post here:

Caluclation of sales of the previous day

1. 01 M Find ,: {fixed[Scanned At]:min(find([Scanned At],','))}

2. 02 M Find .: {fixed[Scanned At]:min(find([Scanned At],'.'))}

3. 03 M Find 2019: {fixed [Scanned At]:min(find([Scanned At],'2019'))}

4. 01 D Day: mid([Scanned At],([01 M Find ,]+2),([02 M Find .]-([01 M Find ,]+2)))

5. 02 D Month: mid([Scanned At],([02 M Find .]+2),([03 M Find 2019]-([02 M Find .]+2)))

6. 03 D Year: mid([Scanned At],[03 M Find 2019],([03 M Find 2019]+4))

7. 04 D Date: DATE(IF NOT ISNULL( DATEPARSE ( "dd-MMMM -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ) THEN DATEPARSE ( "dd-MMMM -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ELSEIF NOT ISNULL ( DATEPARSE ( "MMdd-'Mai' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ) THEN DATEPARSE ( "MMdd-'Mai' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ELSEIF NOT ISNULL ( DATEPARSE ( "MM-'Mai' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ) THEN DATEPARSE ( "MM-'Mai' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ELSEIF NOT ISNULL ( DATEPARSE ( "MM-'M'ä'rz' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ) THEN DATEPARSE ( "MM-'M'ä'rz' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )  ELSEIF NOT ISNULL ( DATEPARSE ( "MMdd-'M'ä'rz' -yyyy", [01 D Day]+'-'+[02 D Month]+'-'+[03 D Year] )

8. 04 M Delta: [Anzahl (eindeutig) von Id (Scandaten.csv)] > Right Click > Text menu > Quick Table Calculation > Difference

9. Drag the required calculated fields & measures to the indicated locations

Not sure how you would like to calculate sales because I can't find a price or Sales measure in the dataset?!

Thanks,

Norbert

1 of 1 people found this helpful
• ###### 2. Re: Caluclation of sales of the previous day

Hello Elia- Please find the attached image below and if that's what you wanted please mark answer correct or helpful. It will help the community to assign their time to resolve other queries.