Forum Discussion

hassens's avatar
hassens
Regular Visitor
9 years ago
Solved

Highlight Last Visit Within Table Based on Multiple Criteria

Hi,

 

I'm hoping someone may have tackled a problem similar to mine. I have a table similar in structure to the one below and I want to add a column that dynamically populates with a '1' IF it is the last date that store was visited within that Period.  

 

 

Visit IDStore IDQuestionAnswerPeriodDateLastRead?
1AQuestion 1 101/01/2017 
1AQuestion 2 101/01/2017 
2AQuestion 1 102/01/2017 1
2AQuestion 2 102/01/2017 1
3AQuestion 1 203/05/2017 1
3AQuestion 2 203/05/2017 1
4BQuestion 1 105/01/2017 
4BQuestion 2 105/01/2017 
5BQuestion 1 110/02/2017 1
5BQuestion 2 110/02/2017 1

 

Thanks :)

  • Perhaps a measure like:

     

    Measure = IF([Date]=CALCULATE(MAX([Date]),ALLEXCEPT([Period],[Store])),1,0)

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Perhaps a measure like:

     

    Measure = IF([Date]=CALCULATE(MAX([Date]),ALLEXCEPT([Period],[Store])),1,0)
    • hassens's avatar
      hassens
      Regular Visitor

      Thanks for this - it worked perfectly!