Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Net New Count per Batch

Hi, 

I am new to PowerBI, and I am trying to find the net new count of brands per batch in my data.  Please find the below sample data.

Anu_Alagappan_0-1636485625419.png

 

I need to count the Net new brands in each batch, comparing the previous batches. I would also get more batches like batch4, batch 5 in future. 

Desired output:

Anu_Alagappan_1-1636485684480.png

 

I am unsure on how to bring in the "not in the previous batch" condition to compute for every batch. Can anyone help me with this please? 

 

Thanks in Advance,

Anu

1 ACCEPTED SOLUTION

@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
    _count

 

 

 

You need a quanitifable batch# column

 

smpa01_0-1636489309212.png

 

smpa01_0-1636489344636.png

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

7 REPLIES 7
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of many ways to solve this is to have a Batch_dimenstion table with the index number column that can identify which batches are the previous ones.

 

Picture1.png

 

Brand count not in the previous batches: =
VAR currentbatchindex =
MAX ( 'Batch'[Index] )
VAR currentbatchbrand =
VALUES ( Data[Brand] )
VAR previousbatchesbrand =
CALCULATETABLE (
VALUES ( Data[Brand] ),
FILTER ( ALL ( 'Batch' ), 'Batch'[Index] < currentbatchindex )
)
VAR onlycurrentbatchbrand =
EXCEPT ( currentbatchbrand, previousbatchesbrand )
RETURN
IF ( HASONEVALUE ( 'Batch'[Batch] ), COUNTROWS ( onlycurrentbatchbrand ) )
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
smpa01
Super User
Super User

@Anonymous  can you please provide the sample data in table format and not just picture please?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

Here is the sample table: 

BrandBatch
NikeBatch1
NikeBatch2
GameBatch1
SilkBatch2
CameBatch2
AdidasBatch1
AdidasBatch2
GameBatch3
CameBatch3
hikeBatch3
dellBatch3
JoyBatch3

@Anonymous  Thanks and what is the desired output based on this?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

Desired output is the below ( As shown in the picture) :

Batch13
Batch22
Batch33

 

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

@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
    _count

 

 

 

You need a quanitifable batch# column

 

smpa01_0-1636489309212.png

 

smpa01_0-1636489344636.png

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@Anonymous  did you try the above yet?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.