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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Matej
Helper I
Helper I

return a list of items that have not been sold in 3/6/9 months

Hello, I'm trying to return only a list of items that have not been sold in the last 3/6/9 months. I also have a calendar table created and connected but I'm not very versed in time inteligence in PBI so I'm unsure how to formulate the right measure. 

 

exp.png

1 ACCEPTED SOLUTION
MohTawfik
Resolver I
Resolver I

Check this one
creating months period parameter as follows

MohTawfik_1-1683112721056.png

Then creating measure

Not Sold Items = 

Var Last_Sold_Date=
Max('Table'[Last item Fulfillment Date])

Var Period_END_Date=
DATE(
    year(now()),
    month(now())-'Last Months period'[Last Months period Value],
    DAY(now()
    )
)

Var Result =
If (
    Last_Sold_Date > Period_END_Date,
    "Sold",
    "Not Sold"
)

Return 
Result



 


on matrix visual, you can filter by "not sold"

MohTawfik_0-1683112550226.png


hope this solves your issue

View solution in original post

2 REPLIES 2
MohTawfik
Resolver I
Resolver I

Check this one
creating months period parameter as follows

MohTawfik_1-1683112721056.png

Then creating measure

Not Sold Items = 

Var Last_Sold_Date=
Max('Table'[Last item Fulfillment Date])

Var Period_END_Date=
DATE(
    year(now()),
    month(now())-'Last Months period'[Last Months period Value],
    DAY(now()
    )
)

Var Result =
If (
    Last_Sold_Date > Period_END_Date,
    "Sold",
    "Not Sold"
)

Return 
Result



 


on matrix visual, you can filter by "not sold"

MohTawfik_0-1683112550226.png


hope this solves your issue

This is great! Thanks a lot for the help, really appreciate it. 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.