Forum Discussion
Date Table won't appear in visual
- 6 years ago
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.
- 6 years ago
Is this what you are looking for? You said page 4, but this is on page 5, and I saw the bar chart. I didn't fully understand what you meant when the top chart should look like the bottom chart when one is a line chart and the other is a bar chart. But I do see where the line chart is missing data.
I made a new measure called "Reconnect Residential" that is next to your "Reconnects Residential" (mine is singular, yours plural) and I get a purple line all the way across, with most being zero as that table only has days, but my line shows the zeros whereas yours stops.
So it is the measure I posted above, but specifically:
Reconnect Residential = VAR RowCount = COUNTROWS('INSTALL 2 WEEKS RECONNECTS RESIDENTIAL') RETURN IF(RowCount = BLANK(),0,RowCount)Is that what you were looking for?
As an aside, I made your date table a true date table. You have to click on it in the Report tab, select "Mark as Date Table" and then point out the date field. Not terribly relevant in this example, but it isn't a date table until you tell Power BI it is.
The updated PBIX is here. If that isn't right, can you be more specific about what you want telling me the exact name of the tab that may have two visuals that are the same, where one is right and the other is wrong?
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.
https://www.dropbox.com/s/h9xae0gwu1fqjrl/OZARKSGO%20-%20SUBSCRIBER%20DASHBOARD.pbix?dl=0
On page 4 of the file the top graph shows the incomplete visual and the bottom graph is what it should more or less look like.
Thank you
- edhans6 years ago
Community Champion
Is this what you are looking for? You said page 4, but this is on page 5, and I saw the bar chart. I didn't fully understand what you meant when the top chart should look like the bottom chart when one is a line chart and the other is a bar chart. But I do see where the line chart is missing data.
I made a new measure called "Reconnect Residential" that is next to your "Reconnects Residential" (mine is singular, yours plural) and I get a purple line all the way across, with most being zero as that table only has days, but my line shows the zeros whereas yours stops.
So it is the measure I posted above, but specifically:
Reconnect Residential = VAR RowCount = COUNTROWS('INSTALL 2 WEEKS RECONNECTS RESIDENTIAL') RETURN IF(RowCount = BLANK(),0,RowCount)Is that what you were looking for?
As an aside, I made your date table a true date table. You have to click on it in the Report tab, select "Mark as Date Table" and then point out the date field. Not terribly relevant in this example, but it isn't a date table until you tell Power BI it is.
The updated PBIX is here. If that isn't right, can you be more specific about what you want telling me the exact name of the tab that may have two visuals that are the same, where one is right and the other is wrong?- GunnerJ6 years ago
Post Patron
The Date Table seems to have been my issue. When you say you made it a "true" date table what does that involve? I'm hoping to learn and avoid this kind of mistake in the future.
Thank you for your help!
- edhans6 years ago
Community Champion
It wasn't the issue actually, it was the measure. Your "implicit" measure (you dragged a value and Power BI created a measure) didn't handle no records, so no records returns BLANK, which doesn't show up in visuals.
My "explicit" measure said "if the total is blank, then return 0, otherwise, return the real row count", and 0's do show up in visuals.
As for date tables, once you've created them:
- Right-click on it
- Select Mark As Date Table
- Mark as Date table (again, on the sub-menu. Seems redundant to me, but that is the way it is)
- On the dialog that opens up, select the actual Date field in your table. It will then run a validation to ensure it is a true date table, and tell you why it isn't if it cannot validate. (Missing dates, text fields vs date fields, etc)
Then I turn off ALL automatic date logic in the options. You want to control the date logic. Don't let Power BI do it as you could get wierd results you cannot explain until you realize it is using a date table it created from a PO table with or something. It will actually create a hidden date table for every date field it finds in the model if you let it do it automatically. I always just one one date table.