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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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