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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
hshayhorn
New Member

Filtering data

I have a table in Power BI that has monthly cost data.  Some of the products have been decommissioned or reclassified since the last invoice from finance.  I currently have a column in another table that defines each of the products that flags the product as decommissioned or reclassified and when showing what the future forecast of costs might be I’m able to sort out those decommissioned or reclassified products very easily BUT, it also removes them from all previous months also.  What I would like to do is add a date column to the product definition table that indicates when the reclass or decommission will occur so that the product is only remove from that month forward.  What is the best way to do that?

 

The file coming from finance has the separate line for each product and their cost for every month.  So if apples was reclassified in April and melons was decommissioned in Mar the data should look like the table.  I might still have data in the sales file for these products and the months but because there is a date in the products definition table the amounts would be filtered out from the date in the table forward.

ProductJanFebMarApr
Apples100127175 
Pears97758267
Lettuce10310799175
Melons115175  

 

 

1 REPLY 1
amitchandak
Super User
Super User

@hshayhorn , I think unpivot data and lost logic can help

 

Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g

 

Create a date from month

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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