Forum Discussion
Date Table won't appear in visual
I have a table that has a column with dates on it. Some dates don't appear as there simply isn't any data for those specific days. I created a simple date table that shows today through two weeks with the hope that using it will allow my visual to show the empty days as empty. I have a 1:M relationship between my date table and the column with dates in it for my data. When I
Date Table:
11 Replies
- amitchandak
Super User
If you can try. Put the count of date from date table into tooltip and check
- edhans
Community Champion
- Make sure the date you are putting in your visual is from your Date table, not your data table.
- You can click on the dropdown next to the Date field in the visual and tell it to "Show items with no data"
Often visuals won't show blanks. Another approach is to use a measure.
Total Sales = VAR TotalSales = SUM(Sales[Sales]) RETURN IF(TotalSales = BLANK(), 0, TotalSales)That will return 0, not blank.
- GunnerJ
Post Patron
After I checked "Show blanks" I see the dates but my data simply isn't filling in as a would expect. It doesn't recognize the dates it would seem.
I double checked and the date field in my data table is a date type. I don't understand why it won't populate correctly. All I want is a count of the rows by the displayed dates.
- edhans
Community Champion
Your Model should look roughly like this:
And your visual should look roughly like this with these fields from the specific tables I am pointing to:
And the Row Count measure is this:
Row Count = VAR RowCount = COUNTROWS(Sales) RETURN IF(RowCount = BLANK(), 0, RowCount)If that isn't working, please at a minimum show us the fields you are using in your visual, as well as the model view, or better yet, just put a PBIX file with no confidential info in OneDrive and share it here.
- kentyler
Solution Sage
Power BI has a setting to show items with no data https://docs.microsoft.com/en-us/power-bi/desktop-show-items-no-data