Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I've got a table like this where I've loaded four of the rows from my data source but included a field in the load statement called 'Month Name' which is monthName(Transaction_Date) as 'MonthName'.
Customer_ID | Customer_Name | Transaction_Date | MonthName | Flag |
---|---|---|---|---|
1234 | Mr X | 01/01/2016 | Jan 2016 | N |
5678 | Mrs Y | 01/03/2016 | Mar 2016 | Y |
1435 | Mr Z | 12/03/2016 | Mar 2016 | N |
I'm trying to create a little KPI table where I'd like to do a count of customer IDs in a particular month. COUNT(DISTINCT{<MonthName="Mar 2016">}Customer_ID)
I didn't want to apply a filter pane in this sheet as I need to call upon data from other past months in the same sheet. I'm trying to apply some filters in the expressions instead. My answer keeps defaulting to zero however. If I remove "Mar 2016" I get a number, e.g. 4,012. Is something funny going on with my datestamp converting it to a number and how might I get around it?
Many thanks,
Sarah
Try this:
Count(DISTINCT{<MonthName = {"Mar 2016"}>}Customer_ID)
If this doesn't work, would you be able to share the script which you used to create the MonthName field?
Try this:
Count(DISTINCT{<MonthName = {"Mar 2016"}>}Customer_ID)
If this doesn't work, would you be able to share the script which you used to create the MonthName field?
Thanks Sunny, that worked perfectly!
Thanks again,
Sarah