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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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

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

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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