Forum Discussion

julsr's avatar
julsr
Continued Contributor
1 year ago
Solved

Average of values by clientcode

Hello everyone,   I have a dataset where I have a value for each Consumer Code that is duplicated for each ID I have on my database. I want to return the unique Amount value for each Code and Each ...
  • ryan_mayu's avatar
    1 year ago

    julsr 

    maybe you can try to create a new column to get the average first

     

    Column = DIVIDE('Table'[AMOUNT], countx(FILTER('Table','Table'[CODE]=EARLIER('Table'[CODE])&&year('Table'[Date])=year(EARLIER('Table'[Date]))&&month('Table'[Date])=month(EARLIER('Table'[Date]))),'Table'[CODE]))