Skip to main content

Hello, I'm a new FME user and normaly only work with Tableau. I'm used to create calculations inside Tableau but now I want to do this with FME so I can fill our new datawarehouse.

 

I've got a dataset with a start date (dd_begin) and an end date (dd_eind). I need to count distinct the customer id's per Month. In Tableau I've created 12 calculations per year. For example, if I want to count the number of unique customers in January 2020 I need below Tableau calculation:

 

COUNTD(

if iDD_BEGIN] < date(#01-02-2020#) and (nDD_EIND] >= date(#01-01-2020#) or ISNULL(UDD_EIND])) then hCLIENTNR] end)

 

for February 2020 the calculation would be:

 

COUNTD(

if

 

And so on and after this I use those 12 calculated fields to create a bar chart for the entire year so every month is visible inside 1 visual in Tableau.

 

How can I do the same calculations in FME or is there an easier way to get the same data result?

 

Kind regards,

Richard

Good question,

​

Assuming your table has individual dates per row, you can use the StatisticCalculator transformer to group the two attributes together to give you your SUM of customers.

​

Hope this helped!​


@sanchezenschede​  Welcome to the FME community. If you're comfortable with SQL, you can also try the InlineQuerier, or if the data is already in a source database SQLExecutor


Reply