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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
magnifybi
Resolver I
Resolver I

Help to fill in a blank date by the setting it as the earliest date in a date slicer

Hey,

 

I have an issue where I have blank Date data for a map. I need to have the blank data filled in the the earliest date I select on the date slicer so certain data always shows on the map when changing the date range.

 

I have currently put a temporary solution in here by merging the data with a date table for every day of the month, but this isn't clean or completely functional.

 

Any help would be great.

11 REPLIES 11
Anonymous
Not applicable

Not enough details to solve the problem.



Sorry it’s a little complex to describe but I’ll try to give you some more detail.

I am using a route map in order to track train lines and he stations but I am also plotting locations of where people live In relation to the train line.

I am also plotting locations to be able to see when each of the people had an appointment date. the issue is here is that there is obviously no date related to the train line but I want the train line to stay on the map at all times.

As mentioned above how I have currently got around it is merging the train line locations with a date from every month of the year it’s working in so much that you have to have a the particular date within the slicer for it to Appear.

What I was wondering is how could I write a formula or create a series of measures or calculated Column so that the date linked to a train stop is always the minimum date that is selected in my slicer
Anonymous
Not applicable

I'd suggest doing something different. I understand from what you say that some points don't stay on the map because the measure returned is BLANK(). Never fear! 🙂 Create a different measure that will return an empty string '' for any train line (or even something like 'no date' or 'date - N/A', you get the idea) and then drop the measure on your canvass...

 

So, would that work?

 

Best

Darek

Also, it's worth re-mentioning that I am using the custom visual "Route Map" not the standard map. This only allows for one measure or field in each category;

 

Timestamp

Latitude

Longitude

Segment

Colour of Legend

Width Legend

Dash Legend

 

Anonymous
Not applicable

Hi there.

 

Mate, of course, you cannot mix dates with strings. I was suggesting to create a different column that will store dates as strings alongside the dates. Then you can have something that looks like a date but is a string. And because of this you can have anything you want in the column and hence return it via a measure. Simple?

 

Best

Darek

Thanks Darek, the only issue with this is that you can't then use a date slicer as the field is not formatted as a date.

 

 

Anonymous
Not applicable

Wait... you wanted a MEASURE... that would return a date for non-trains and something - not BLANK - for trains, right? I suggested to use the new string column to retrieve dates for non-trains and the string of your choice for trains.

 

Unless I don't understand your requirements...

 

Best

Darek

I think I might have not been clear with the requirements.

 

I have a map that is being filtered by a date slicer currently. The problem is the train stations don't have a date related to them. I could put a date next to them, but if the slicer doens't include that particular date then the train station disappears.

 

What I need, is the ability to use the date slicer for the people so they will appear if within the selected date range. The issue is I need the train stations to stay on the map regardless.

 

Hope that makes sense

 

 

Anonymous
Not applicable

Yes, this makes sense but if you slice by date, then there's no way you can see the trains for all selections of dates. Simple as this. This is because a column can only hold 1 value and 1 value only. You cannot change the value of a column in a table dynamically.

 

I think you should probably have 2 tables: one for non-trains and one for trains. This way you'll keep 2 fundamentally different entities (one has a date, the other doesn't) in separate tables and things might then become much easier. But what is this map that can't hold more than 1 measure? Isn't this pretty limited? Can't you just change this to something better?

 

Best

Darek

I tried to added N/A to the exisiting date column and I can no longer format that column as a date, the "N/A" turns to an error. Also I lose the ability to use the Data Slicer

Hey Darak,

 

Thanks for the reply, just so I am clear, currently I have data like the following;

 

Person 1            01/01/2018

Person 2            01/04/2017

Train Station 1   01/01/2018

Train Station 1   01/02/2018

 

Are you suggesting that in place of the dates for train stations should add "N/A" or "No Date", or are you suggesting to create a new measure and do this?

 

Thanks,

 

Jon

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.