cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
trungnguyen0000
Helper IV
Helper IV

Relationship between date table and data table (with null date)

Hi guys,

 

I have 2 tables INVOICE and DATE

 

Date table =

 

 ADDCOLUMNS(

calendar(min(INVOICE[INVOICE DATE]), EOMONTH(TODAY(),-1)), 

"MonthNum", MONTH([Date]),
"Month", FORMAT([Date], "MMMM"),

"Year", YEAR([Date])
)

 

 

there is a relationship between INVOICE and DATE (* ...1) by the field 'INVOICE'[INVOICE DATE] and 'DATE'[Date]

 

for a unknow reason, [INVOICE DATE] can have value NULL. Let's admit it's possible.

I always used my 'Date' table in filters, formulas, etc

 

I have some question :

1) Do you think what I have done is correct ?

2) when I put the 'Date'[Date] in the page filter, why there is null value (VIDE) in the list. There is not null value in my date table

trungnguyen0000_0-1632410514300.png

 

3)I made a table with the hierarchy of the date table and the 'INVOICE'[N° Invoice] to count the number distinct of invoice, there is 49673 for date = null

trungnguyen0000_2-1632411915903.png

 

but when I checked in the data tab and I filtered 'INVOICE'[Invoice Date] = null, there is only  6469 line. There is a inconsistency

trungnguyen0000_4-1632412053306.png

 

 

Can you tell me what I did wrong ?

 

Thank you

 

 

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @trungnguyen0000 ,

 

The following articles shows you how to remove blank from slicers:

https://www.c-sharpcorner.com/article/how-to-remove-blank-from-power-bi-slicer/

https://www.encorebusiness.com/blog/blank-value-in-the-power-bi-slicer-and-filter/

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@trungnguyen0000 , I think there are missing date, try like

 

 

 

ADDCOLUMNS(

calendar(min(INVOICE[INVOICE DATE]), EOMONTH(Max(INVOICE[INVOICE DATE]),0)), 

"MonthNum", MONTH([Date]),
"Month", FORMAT([Date], "MMMM"),

"Year", YEAR([Date])
)

 

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors