Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter on unique values

OrderCreated weekReported weekPriorityStatus
100088811urgentInitiative
100088812

urgent

In progress
100088813urgentEvaluate
100098922lowIn progress
100088814urgentFinished
100089132highIn progress
100089133highEvaluate
100099013lowInitiative

 

Hi all,

 

I have the above dataset where on a weekly base we do a snapshot of our database containing orders with corresponding statuses. Every week a new shapshot is labeled using the reported week column, in this way you can see on a weekly basis if the status of an order has changed. The created week column provides the week in which the order is created and helps to find out if in a given week new orders have been entered.

 

I would like to have a visual where I can show how many new orders have been entered in a week with the status high en urgent, does anybody have an idea how I could do that? A new order can change status within a week, so filtering on initiative is not an option. E.g.: maybe the first week a ordernumber is shown you would like to have an extra column generating a 1 and if the ordernumber already popped up a week earlier that column should be left empty.

 

Cheers,

Lucas

 

  • Hi Anonymous ,

     

    Would you please refer to the following measure:

     

    Measure = CALCULATE(DISTINCTCOUNT('Table'[Order]), FILTER('Table','Table'[Created week] = MAX('Table'[Created week])&&  CALCULATE(MAX('Table'[Priority]),FILTER(ALLEXCEPT('Table','Table'[Order]),'Table'[Reported week] = MIN('Table'[Reported week]))) in {"high", "urgent"}))

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Dedmon Dai

2 Replies