dimanche 26 avril 2020

Increment the max of a column each time a value is found in power query

I have a column with values counting occurences.

I am trying to continue the series in Power Query.

I am thus trying to increment 1 to the max of the given column...but this is not working, I do not understand why.

I have a Max column which is the higest amount of ItalyZ at a previous date (I created it).

When I have "ItalyZ", I would like to be able to increment it, but it is sadly, not working.

  |------------------|---------------------|    
  |       Max        |      Geography      |
  |------------------|---------------------|
  |      0563        |        ItalyZ       |
  |------------------|---------------------|
  |     0            |     thrzjz          |
  |------------------|---------------------|
  |     0563         |        ItalyZ       |
  |------------------|---------------------|

Here is the costum column formula:

if [Max] <> 0 then AddedIndex{[Index]}[Max] + 1 else 0

I get the following error "The field "Max" of the reccord was not found. I have zeros for all my zeros in max, but when I have my Max in max if get this result. This is extremly frustrating.

I do not not know if there is a radically better way. Maybe doing this max value that I did previously is not even necessary.

Aucun commentaire:

Enregistrer un commentaire