models
2 TopicsAdventure Works 2020 Model - blank dates DAX filter context
Hi all, I am trying to understand more about filter contexts in DAX. For this, I have downloaded the Adventure 2020 model from this link https://learn.microsoft.com/en-us/dax/dax-sample-model I started with creating a a simple matrix visual with "Year" on the rows and a measure "Number of dates in range" which calculates the maximum visible date in the values field When I do this I am seeing one row in the visual where the year is blank. I am trying to figure out what is causing this. I had a few sales related measures in the visual initally. First thought was there there could be sales in the sales table which do not have a corresponding "order date" in the date table. Removing those sales related measures didn't do anything as I can still see those blank values Hopefully, the screenshot below might help I also added year slicer. Now this year slicer shows a blank value for some reason. I checked the date table but couldn't find anything Here is the measure I created Number of dates in range = VAR LastdateinContext = MAX('Date'[date]) VAR DatesinRange = FILTER ( 'Date', 'Date'[Date] <= LastdateinContext ) VAR AllDates =all('Date'[Year]) RETURN COUNTROWS(AllDates) I am sure I am missing something very obvious. But I'm just not able to figure out what that is. I looked at the model to check if there are any odd looking dates in the tables that should not be there but have not been able to find anything Any help will be much appreciated! Thank youSolved1.6KViews0likes5CommentsRelations & models
Hello Everyone Wanted to ask you, i have a relation between sales & store (1 to many) & product to sales (1 to many) my question, how to make it to display only products available in certain store, for example if i choose store 3, i want it to display only products of store 3, should i do a new table for that or is there some tip for that? thanks1.6KViews0likes8Comments