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
Anonymous
Not applicable

1st time a Product was Sold in Area

Hi there,

 

So what i am looking to do is based on every sale we have, i want to be able to see when was the 1st time each product was sold in an Area. So for example if store 1 had the below data

DateProductAreaSold
10/10/1011No
12/10/1011Yes
17/10/1011Yes

 

I would want to be able to display in a table by date a count of 1 for the 12/10/10, because that was the 1st time that product was sold in that area.

 

Any help would be great

1 ACCEPTED SOLUTION
rohit_singh
Solution Sage
Solution Sage

Hi @Anonymous ,

Please try creating a measure like this :

rohit_singh_0-1655459009091.png

Min Date =

var _mindate =
CALCULATE(
MIN('Product'[Date]),
FILTER(
ALLEXCEPT('Product', 'Product'[Area], 'Product'[Product]),
'Product'[Sold] = "Yes")
)

RETURN
if(_mindate = max('Product'[Date]) , 1 , 0)

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

View solution in original post

1 REPLY 1
rohit_singh
Solution Sage
Solution Sage

Hi @Anonymous ,

Please try creating a measure like this :

rohit_singh_0-1655459009091.png

Min Date =

var _mindate =
CALCULATE(
MIN('Product'[Date]),
FILTER(
ALLEXCEPT('Product', 'Product'[Area], 'Product'[Product]),
'Product'[Sold] = "Yes")
)

RETURN
if(_mindate = max('Product'[Date]) , 1 , 0)

Kind regards,

Rohit


Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

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.