Amgad Nassif
Amgad Nassif

Reputation: 7

Tableau Create a KPI Box showing growth in count (Month-over-Month)

I am trying to calculate growth in count of items (Month-over-Month) based on dates they were created at. I am getting wrong numbers when I use this formula:

{FIXED : COUNTD(IF MONTH ([Created Date]) = {MAX(MONTH([Created Date]))} THEN [Item ID] END )}

then

{FIXED : COUNTD(IF MONTH ([Created Date]) = {MAX(MONTH([Created Date]))} THEN [Item ID] END )} -1

Knowing that Item ID is a string, i.e. alphanumeric

Upvotes: 0

Views: 121

Answers (1)

Sound in Worship
Sound in Worship

Reputation: 478

For LOD expressions, depending on what you're going after, you will need to place dimensions before the colon. This would be worth a try.

Example:

{FIXED [dimension 1],[dimension 2] : COUNTD(IF MONTH ([Created Date]) = {MAX(MONTH([Created Date]))} THEN [Item ID] END )}

or in general:

{FIXED [dimension 1],[dimension 2] : Aggregation END )}

Upvotes: 0

Related Questions