Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure doubt

Hello Team ,
Following is my raw data table 

RevisionDocument noIslatest State 
12AFALSEreleased
15AFALSEreleased
20AFALSEretired
31ATRUEreleased
12BFALSEretired
43BFALSEwork in progress
55BTRUEwork in progress

 

 

 

So i have to create a measure which will help me show visualization in powerbi report 

I have to check if the current document which has the largest revision ID and which is latest column is True , should be either work in progress or should be released 

but if there is a document of which revision is not the largest and it is not the latest then it should be released first and then the higher revision id document work should be started .

 

 

for example the last two rows can be seen that the revision id 43 is still work in progress and it is not even latest but still not released hence we should make a measure which will show in next column using measure as shown below,

 

RevisionDocument noIslatest State Overlap
12AFALSEreleasedno
15AFALSEreleasedno
20AFALSEretiredno
31ATRUEreleasedno
12BFALSEretiredno
43BFALSEwork in progressyes
55BTRUEwork in progresslatest but overlap with last revision

 

that means the latest largest revision must be only in work in progress if the earlier row is released . if the earlier row is not released it is still work in progress then measure should flag them as shown above 

 

please ask questions if anything is not clear any help is appreciated 

 

please help

  • Anonymous's avatar
    Anonymous
    4 years ago

    i got this solved thanks . I used this 

    flag = i entered yes for all the last projects which had maximum rev id

     

    flags3 = var a = MINX(FILTER(Sheet1,Sheet1[flags]="yes"),Sheet1[RevisionID])
    return
    IF(Sheet1[flags]="yes" && Sheet1[DocumentName]=Sheet1[DocumentName]
    &&
    Sheet1[RevisionID] > a && Sheet1[StateText] <> "Released" , "flagged","ok")

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    i got this solved thanks . I used this 

    flag = i entered yes for all the last projects which had maximum rev id

     

    flags3 = var a = MINX(FILTER(Sheet1,Sheet1[flags]="yes"),Sheet1[RevisionID])
    return
    IF(Sheet1[flags]="yes" && Sheet1[DocumentName]=Sheet1[DocumentName]
    &&
    Sheet1[RevisionID] > a && Sheet1[StateText] <> "Released" , "flagged","ok")