1)Project Milestones table containing Project Codes and 4 dates per each project (Date1, Date2, Date3, Date4) 2)Projects Table containing unique project codes
3)Locations table containing Locations and related Project codes
I have a rule in Project Milestones table in order to determine if a project is ACTIVE in a certain year and it is as follow:
Active in 2018 = IF((YEAR(Date 1)<=2018 || YEAR(Date 2)<=2018) && (YEAR(Date 3)>= 2018 || YEAR(Date 4)>=2018)."Active"."Not Active")
This rule gives me all the ACTIVE Projects in 2018 displayed per Location. PROBLEM: I want the user to be able to select a YEAR himself in order to see all the active projects for the selected year; (not fixed 2018 anymore)
i tried this: i have created a new Calendar table containing dates and applied this rule:
Active in X = VAR SelectedYear=SELECTEDVALUE('Calendar'[Year]) RETURN IF((YEAR(Date 1)<=SelectedYear || YEAR(Date 2)<=SelectedYear) && (YEAR(Date 3)>= SelectedYear || YEAR(Date 4)>=SelectedYear)."Active"."Not Active")
Apparently SelectedYear=SELECTEDVALUE('Calendar'[Year]) doesn't work properly. Do you know how can i improve this rule ?
I did exactly the same thing, still not working. Per each year i have the same number of Projects (total of 296), even if i select a certain year i still have the same number (296). if i don't select a year then i still see the same 296 per each year.
I'm using Power BI Report Report Server Desktop August 2018.
Is it possible that you have connected the DimDate table to your Test table ? or there's no relationship at all ? In my case they are not connected an looks like because of this there's no reaction if i filter the year, i mean:
If i don't filter any year, then i see per each year 296 projects, but if i select only one year i still see 296 projects per that year. The measure is not adapting to the year selection