cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 302 members 3,020 guests
Please welcome our newest community members: