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

Data removed because of dates

Hello Everyone,

I have an issue with dates calculations : 

I try to evaluate a stock at different dates. To do so I have two files  : one with the stock evaluated today and another one with the required quantities and the dates corresponding. 
To decide the date at which I want to see the state of the stock, I use a slicer "before" with all the dates from a date table. 

However, when I do not have any requirements before the date selected, the line is completely removed from my matrix (which I don't want, I would rather have the stock as it is now).

How can I force Power BI to display the line even if there are no data?

SimonA_0-1619791028068.png

Here is when I have a requirement within the period selected , but if I go 10 days before, the line doesn't appear anymore. 

I also give you the measures that I use : 

 

Stock reel - BOM = CALCULATE(SUMX('Stock usine','Stock usine'[Stock usine] - [Pack requirements **bleep** - BOM]), FILTER('Bill of Materials','Bill of Materials'[(BOM) Base Component]), FILTER(ALL(DateTable),DateTable[Date] <= MAX(DateTable[Date])))
 
Pack requirements **bleep** - BOM = CALCULATE(SUMX('Packaging needs','Packaging needs'[Requirement Quantity (ERFME)]),FILTER(ALL(DateTable),DateTable[Date] <= MAX(DateTable[Date])), FILTER('Bill of Materials','Bill of Materials'[(BOM) Base Component]))

Relations between tables are  : 
- many to many between Bill of Materials and Packaging needs
- one to many between DateTable and Packaging needs.
 
Thank you very much in advance for all your help.
 
Simon
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous +0 or show item with no data , may help to show data

 

Stock reel - BOM = CALCULATE(SUMX('Stock usine','Stock usine'[Stock usine] - [Pack requirements **bleep** - BOM]), FILTER('Bill of Materials','Bill of Materials'[(BOM) Base Component]), FILTER(ALL(DateTable),DateTable[Date] <= MAX(DateTable[Date])))+0

Pack requirements **bleep** - BOM = CALCULATE(SUMX('Packaging needs','Packaging needs'[Requirement Quantity (ERFME)]),FILTER(ALL(DateTable),DateTable[Date] <= MAX(DateTable[Date])), FILTER('Bill of Materials','Bill of Materials'[(BOM) Base Component])) +0

 

ShowItemwithoutdata.JPG

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous +0 or show item with no data , may help to show data

 

Stock reel - BOM = CALCULATE(SUMX('Stock usine','Stock usine'[Stock usine] - [Pack requirements **bleep** - BOM]), FILTER('Bill of Materials','Bill of Materials'[(BOM) Base Component]), FILTER(ALL(DateTable),DateTable[Date] <= MAX(DateTable[Date])))+0

Pack requirements **bleep** - BOM = CALCULATE(SUMX('Packaging needs','Packaging needs'[Requirement Quantity (ERFME)]),FILTER(ALL(DateTable),DateTable[Date] <= MAX(DateTable[Date])), FILTER('Bill of Materials','Bill of Materials'[(BOM) Base Component])) +0

 

ShowItemwithoutdata.JPG

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors