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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
felipescamilo
New Member

How do I calculate how many different products a store has sold in a month?

Hi! I'm having trouble calculating how many different products a store has bought in a month. I'm currently using the following formula as in an example for august:

CALCULATE(
(DISTINCTCOUNT(Product[Product Code),
FILTER([Product], [#Sales]>0),
Date[Month/Year]="aug/2022")

 
It returns me how many different products the store has sold, but it is not considering in august. The number is always the same for every month i pick.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @felipescamilo 

please try

=
COUNTROWS (
CALCULATETABLE (
VALUES ( 'Product'[Product Code] ),
CROSSFILTER ( 'Product'[Product Code], 'Sales'[Product Code], BOTH )
)
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @felipescamilo 

please try

=
COUNTROWS (
CALCULATETABLE (
VALUES ( 'Product'[Product Code] ),
CROSSFILTER ( 'Product'[Product Code], 'Sales'[Product Code], BOTH )
)
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.