Skip to main content

#New0 人正在讨论

The data I have are in separate text files as csv's.

A csv cannot have multiple worksheets in it.

I'm adding all the csv tables (4 in total) and making it one combined source.

Then I add a separate new table a try to left join the one combined source to the new table.

The result is it only joins with one csv table because the added csv files won't combine into one source.

 

I'm adding the files as follows:

File -> New

Connect to data: Text File -> point to first .csv -> OK -> Import All Data -> Save Extract

Right click on Extract -> Add Data From File ... -> Choose 2nd txt file.  Should get "x rows successfully added."

(repeat as needed, but try adding 2 files and see what happens)

Data -> Connect to Data... -> Text File -> point to join file -> Ok -> Import all Data -> Save Extract

 

Attached is an example. If I left join the book1 with prod_info across prod and product....it cuts off the dates it joins to only october and not oct-dec.

13 个回答
  1. 2013年11月25日 18:53

    Here is a custom sql that works on my computer. I had some localization issues, which were solved by creating a schema.ini file in the same folder.

    .

    SELECT d.date,

      d.store,

      d.qty,

      d.product,

      p.height,

      p.length,

      p.width,

      p.[case qty]

    FROM (

      SELECT [date],

        [store],

        [qty],

        [product]

      FROM [Book1#csv]

      UNION ALL

      SELECT [date],

        [store],

        [qty],

        [product]

      FROM [Book2#csv]

      UNION ALL

      SELECT [date],

        [store],

        [qty],

        [product]

      FROM [Book3#csv]

      ) d

    LEFT JOIN [prod_info#csv] p ON d.product = p.prod

    .

0/9000

Join the Webinar about Salesforce and AI

Unlock the Power of Salesforce with AI!

Join our upcoming webinar for a deep dive into leveraging AI to maximize your CRM potential across Marketing, Sales, and Commerce clouds. We'll explore the practical applications of AI, demystify its capabilities, and guide you on integrating these insights seamlessly into your existing workflows.

Discover how AI can address pain points in your CRM journey, offering personalized solutions tailored to your unique business challenges. We'll share insights on implementing new tech effortlessly and discuss the revolutionary Einstein Copilot – an AI assistant designed to redefine productivity.

Save the date and join us to explore real-world applications, gain actionable insights, and elevate your CRM strategy to new heights.

Don't miss this opportunity to supercharge your business with AI-driven solutions.

#AI #Salesforce #BusinessTransformation

Save the date: January 31, 2 PM CT

https://lnkd.in/eggACinu

#Marketing Cloud  #New Releases

0/9000

This Monday we realized that notifications do not arrive from Work records when a comment is added mentioning a Salesforce user.

 

The emails that should arrive are from "reply@chatter.salesforce.com". I've checked the Chatter notification settings to see if something has been disabled, but that's not the case:Problem with Work object notification emails

The Salesforce Agile Accelerator package may have been impacted following Salesforce's Winter 24 update on Saturday the 24th.

 

Thanks in advance for the help.

5 个回答
0/9000

Saludos a todos aca en la trailblazer community, mi pregunta es la siguiente, que debería comenzar a hacer con respecto a rutas o trailmix? Ya que estoy comenzando en Salesforce, honestamente no sé mucho de la plataforma, soy técnico electrónico y estoy intentando migrar al mundo del IT. Actualmente estudio desarrollo web, pero he leído que igual aca en Salesforce se puede desarrollar mediante APEX, igualmente he leído que primero debo comenzar con las rutas de administrador para entender cómo se maneja la plataforma y de que va en sí. Todo consejo sera muy bien recibido, muchas gracias de antemano. 

 

#Trailhead  #Salesforce Developer  #New Releases  #Integration  #Analytics#Trailhead #Salesforce Developer
4 个回答
  1. 2023年7月11日 12:28
    Hola Inés, espero que estes bien! A los días me eligieron en dos becas de desarrollo web y he estado desde marzo todos los días estudiando, aparte de mi trabajo. Por ende, lo deje a un lado momentáneamente, aunque sigo convencido que después de terminar estos bootcamps como developer ahora en septiembre, lo retomaré!
0/9000

I am trying to calculate the number of employees at the beginning and the end of each month. I have a calculation for the beginning of the month (below) but can't figure out how to convert that to the end of the month count.

 

Beginning of month calculation :

 

IIF([Employee Status]="Active",DATEPART('month',TODAY()),0)

 

This does give me the numbers I need. Any help is appreciated.

5 个回答
  1. 2022年12月13日 17:57

    @Cheryl Mandall​ hi there,

    I cannot see here the date scaffolded.

    It should be the months/year/start month and end month.

    Anyway, let's get to the bottom of this.

    To make it possible let's change the empty End Date to "9999-01-01"- means the will be active till year 9999 unless the termination is changed to a early one. This is just to replace the blanks and make it useful.

    @Cheryl Mandall​ hi there,I cannot see here the date scaffolded.It should be the months/year/start month and end month.Anyway, let's get to the bottom of this.I created the months for scaffold date (tried to hit the best practices) for 2021/2022 year (you can extend).

    imageNow we join them together.

    If the Start Date <= End of the month - Active user at least till the end of the month.

    If the End date >= Start date of the month means the user is not year terminated.

    You can test here and experiment and adapt to your data if this is not working.

    imageNow you can see you data multiplied for the rows which make sense for each period.

    Let's get into calculations.

    // #New hire

    COUNTD(IF [Start Date]>=[Start Month] and [Start Date]<=[End Month] THEN [Employee Number] END)

    If the Start date is in between that month it'll count there as a New Hire.

    Same for the termination:

    // ⌗Terminations

    COUNTD(IF [End Date]>=[Start Month] and [End Date]<=[End Month] THEN [Employee Number] END)

    ⌗Active (headcount)

    COUNTD(IF [Employee Status]="Active" and [End Date]>[End Month] THEN [Employee Number] END)

    Active - termination outside of the period and status Active.

    Now you can plot the data.

    Just because you're going to stick with the Current Year or Previous Year I'll continue adding calculations.

    Example for the Termination CY:

    COUNTD(IF [End Date]>=[Start Month] and [End Date]<=[End Month] and [Year]=2022 THEN [Employee Number] END)

    Same for the rest of the indicators, you only need to create the PY calculations.

    When calculating the turnover is it getting a little more tricky.

    You need to calculate cumulative numbers for the Terminations and the average Active users. (hope this is the calculation).

    Same as CY but cumulative, and it should be uses as Running total.

    { FIXED [Month], [Year]: COUNTD(IF [Year]=2022 and [Month]<={ FIXED [Month], [Year]:MAX([Month])}

    and [End Date]>=[Start Month] and [End Date]<=[End Month]

     

    THEN [Employee Number] END)}

     

    For the Active users same, just we need to use the Running Average.

    { FIXED [Month], [Year]: COUNTD(IF [Year]=2022 and [Month]<={ FIXED [Month], [Year]:MAX([Month])}

    and [Employee Status]="Active" and [End Date]>[End Month]

     

    THEN [Employee Number] END)}

    And this is the result in the view (cumulative terminations and average active users).

    imageI left "Sheet1" for you to see the table calculations.

    Final calculation for the Turnover %:

    RUNNING_SUM(SUM([cumulative terminations]))

    /

    WINDOW_AVG(SUM([cumulative Active]), -2, 0)

    Now we can plot it. Also I create 2 views and added the Termination with minus (so you can check In and Out).

    imageSo you can check the active employees for the CY and employee turnover %, with New Hires and terminations.

    Next steps it's up to you. You can create parameters for the CY and PY years and replace 2022 and 2021 numbers.

    Create the rest of PY calculations -> so you can compare with previous year.

    Document attached.

    Let me know,

    Adrian

0/9000

I need to calculate churn over time per month and then per quarter. I have the following fields;

 

Beginning # of customers - at the start of the period

⌗New customers per month - calculated field on tableau (1st purchase date on tableau workbook)

⌗Churned customers per month - calculated field on tableau(Last order date on tableau workbook)

Month end customers - (formulae :Beginning Customers+# New customers for the month - ⌗Churned Customers in the month)

Net new customers -  (# New customers per month - # Churned customers per month)

Churn Rate per month -(# churned customers/(Beginning Customers+# New customers in the month )

 

The month end customers in Jan for example becomes beginning customers in February and so on.

 

I have attached the excel worksheet and thats what I want to replicate on tableau. I have also attached a tableau workbook with sample data.

4 个回答
  1. 2015年11月10日 08:21

    I used the formulae you used in you gave in your description to get the following. I do not understand where you are failing? Your requirement is achievable! Please mention where you are facing difficulty?

     

    I used the formulae you used in you gave in your description to get the following. I do not understand where you are failing?

0/9000

I have a set of data from which I can show the distinct set of customers who ordered something in 2011 and the distinct set who ordered something in 2012.  Some customers ordered in both years, some in only one of the years.  I can see the total difference in the customer base between the two years, but what I want to be able to show is the number of customers who are 'lost' (ordered in 2011 but not in 2012) and the number who are 'new' (ordered in 2012 but not 2011).

 

I'm sure this is possible, but my table calculation skills are not yet up to that level.  Basic sample of data attached. 

 

Many thanks in advance for any help.

2 个回答
  1. 2013年3月13日 18:38

    Hi Donna,

     

    By creating a calculated field similar to the following should get you the desired output:

     

    if window_sum(countd([Customer (copy)]))=2 then "Returned"

    elseif countd([Customer (copy)])=1 and max([Ordered Year])=2012 or (isnull(countd([Customer (copy)])) and max([Ordered Year])=2011) then "New"

    elseif countd([Customer (copy)])=1 and max([Ordered Year])=2011 or (isnull(countd([Customer (copy)])) and max([Ordered Year])=2012) then "Lost"

    end

     

    Place this on the filter shelf and Exclude Null.

     

    Hope this helps!

     

    -Tracy

0/9000