Forum Discussion
Getting a max step from a group
Hi All
I have what I think could be a fairly simply problem to solve but I have been going around and around in circles to try to get the answer and now I'm just stuck or not understanding why this would not work.
I have a table below and I want to identify with a 1 which step is the max step in the GROUP, the unique or grouped item is the DocNumber and the group has several steps, all I am trying to do is to add an indicator to say the highest step number I have tried some what I thought would work calculation but it always ends up the same way 😞
MaxStepNo = MAXX( FILTER( 'Document Steps', 'Document Steps'[DocNumber] = EARLIER( 'Document Steps'[DocNumber] ) ), 'Document Steps'[StepNo] )
6 Replies
- SpartaBICommunity Champion
MaxStepNo = VAR _current_doc = 'Document Steps'[DocNumber] RETURN CALCULATE( MAX('Document Steps'[StepNo]), REMOVEFILTERS('Document Steps'), 'Document Steps'[DocNumber] = _current_doc )In case it answered your question, please accept it as a solution to help the other members find it more quickly. Appreciate Your Kudos 💪
Showcase Report – Contoso By SpartaBI
Website Linkedin Facebook
This is SpartaBI! - CNENFRNLCommunity Champion
MaxStepNo = MAXX( FILTER( 'Document Steps', 'Document Steps'[DocNumber] = EARLIER( 'Document Steps'[DocNumber] ) ), 'Document Steps'[StepNo] )- Greg888Helper I
ok thank you for this so that produced the last step correctly as a number in the column
I then did a
IF(Document Steps [MaxStep] = DocumentSteps[StepNo],1,0)
Which has given me a column I can use going foward. Thanks for all your help