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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.