cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
richbenmintz
Advisor

Re: DAX: SELECTEDVALUE with Dates

Hi @Giavo,

 

I think the following formula should do what you expect, essentially it will count the rows on the 'Project Milestones' table where the conditions are met based on the selected value

 

Active in X =
VAR SelectedYear=SELECTEDVALUE('Calendar'[Year])
RETURN 
Calculate(CountRows('Project Milestones'), FILTER('Project Milestones', (YEAR(Date 1)<=SelectedYear || YEAR(Date 2)<=SelectedYear) &&
(YEAR(Date 3)>= SelectedYear || YEAR(Date 4)>=SelectedYear)))

View solution in original post

Giavo Regular Visitor
Regular Visitor

Re: DAX: SELECTEDVALUE with Dates

Manohar,

thank you again for the solution you have provided me. My Projects Milestones table has dublicate values, and it is connnected to another table Unique Projects where i need to count Projects from. I was expecting the solution to work automatically but it didn't. Are you able to help me with the solution (so counting the Projects from Unique Projects )?

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 308 members 3,160 guests
Please welcome our newest community members: