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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ScarlettBebb
Frequent Visitor

Measure for Counting Number of Batches per Month per year

Hello 🙂

 

I am trying to create a measure for caluclating the number of batches of a particular product by month and year. Please is anyone able to help with the formula? 

The data looks like this;

ScarlettBebb_1-1682683841998.png

 

And I want a measure that basically would give me this (I don't actually need this table I'm using the measure for a further calculated column)

Product

Month

Year

No batches

G1317CW

January

2023

2

G1317CW

February

2023

0

G1003CW

January

2023

5

G1003CW

Febuary

2023

5

G3DASCW

January

2023

5

 

Thank you so much for helping in advance

1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

@ScarlettBebb 

Batches =
CALCULATE (
    COUNT ( Batches[No Batches] ),
    ALLEXCEPT ( Batches, Batches[Product], Batches[Month], Batches[Year] )
)

Mahesh0016_0-1682686778297.png

 



Thank you!!

View solution in original post

2 REPLIES 2
Mahesh0016
Super User
Super User

@ScarlettBebb 

Batches =
CALCULATE (
    COUNT ( Batches[No Batches] ),
    ALLEXCEPT ( Batches, Batches[Product], Batches[Month], Batches[Year] )
)

Mahesh0016_0-1682686778297.png

 



Thank you!!

Thank you that worked 🙂 

Batches =
CALCULATE (
    COUNT ( 'FPA Data'[Product ] ),
    ALLEXCEPT ( 'FPA Data', 'FPA Data'[Product ], 'FPA Data'[Month], 'FPA Data'[Year] ))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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