Forum Discussion
Net New Count per Batch
- 4 years ago
Anonymous this is possible with the following measure
Measure = VAR _batch = MAX ( 'Table'[_batch] ) VAR _count = COUNTROWS ( EXCEPT ( VALUES ( 'Table'[Brand] ), SUMMARIZE ( FILTER ( ALL ( 'Table' ), 'Table'[_batch] < _batch ), 'Table'[Brand] ) ) ) RETURN _countYou need a quanitifable batch# column
Here is the sample table:
| Brand | Batch |
| Nike | Batch1 |
| Nike | Batch2 |
| Game | Batch1 |
| Silk | Batch2 |
| Came | Batch2 |
| Adidas | Batch1 |
| Adidas | Batch2 |
| Game | Batch3 |
| Came | Batch3 |
| hike | Batch3 |
| dell | Batch3 |
| Joy | Batch3 |
Anonymous Thanks and what is the desired output based on this?
- Anonymous4 years agoNot applicable
Desired output is the below ( As shown in the picture) :
Batch1 3 Batch2 2 Batch3 3 For Batch1 - #Net New brands is same as count of brands in Batch1, as it is the first batch
For Batch2 - #Net New brands is 2, excluding the brands Adidas and Nike as these are available in Batch1
For Batch3 - #Net New brands is 3, excluding the brand "Game" which is available in Batch1 and "Came" which is in Batch2
So the count that we project in the summary needs to be count of brands that are not available in any of the previous batches
- smpa014 years ago
Community Champion
Anonymous this is possible with the following measure
Measure = VAR _batch = MAX ( 'Table'[_batch] ) VAR _count = COUNTROWS ( EXCEPT ( VALUES ( 'Table'[Brand] ), SUMMARIZE ( FILTER ( ALL ( 'Table' ), 'Table'[_batch] < _batch ), 'Table'[Brand] ) ) ) RETURN _countYou need a quanitifable batch# column
- smpa014 years ago
Community Champion
Anonymous did you try the above yet?