Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Min date for every gro

Hi All,

 

can somebody please help me.

 

i have below data.

 

Project 1

Mile Stonestart date 
 milestone101/02/2020 
 milestone211/02/2020 
 milestone321/02/2020 
 milestone426/02/2020 
Project 2   
 milestone101/03/2020 
 milestone211/03/2020 
 milestone321/03/2020 
 milestone426/03/2020 

 

now i want to create out put, min date of every section. strange requirement is i want to keep projects in slicer and min date should change by slicer selection (if i select project 1 it should return 01/02/2020 same for project 2 01/03/2020.

 

thanks in advance.

 

Thank you,

Narendra.

  • Hi Anonymous ,

     

    You have two options or change the sumarization to the minimum value (first value) if you want you can also create a measure similar to:

    MIN(Table[StartDate])

    Be aware that depeding on the way you place things in the visualizaiton you may need to make some adjustments so that the measure is blank when more than one project is selected.

     

    Similar to this:

    IF(DISTINTCTCOUNT(Table[Project]) = 1; MIN(Table[StartDate]); blank())
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

    You can create one measure as below:

     

    Min date = var a=max('project'[Project]) var b= CALCULATE(min('project'[start date]), filter(all('project'),'project'[Project]=a)) return b

     

    Best Regards

    Rena

6 Replies

  • Hi Anonymous ,

     

    You have two options or change the sumarization to the minimum value (first value) if you want you can also create a measure similar to:

    MIN(Table[StartDate])

    Be aware that depeding on the way you place things in the visualizaiton you may need to make some adjustments so that the measure is blank when more than one project is selected.

     

    Similar to this:

    IF(DISTINTCTCOUNT(Table[Project]) = 1; MIN(Table[StartDate]); blank())
  • Calculate(Min(table[Start Date]),allexcept(table[project]))

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    You can create one measure as below:

     

    Min date = var a=max('project'[Project]) var b= CALCULATE(min('project'[start date]), filter(all('project'),'project'[Project]=a)) return b

     

    Best Regards

    Rena

  • Anonymous , three solutions has been provided. Can you please check if your problem is resolved.

    • Anonymous's avatar
      Anonymous
      Not applicable

      sorry for late reply.

       

      yes i have managed to achieve my requirement using all 4 solutions to gether.

       

      Thank you,

      Narendra.

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous, Please post the solution, so others can get help and mark that solution.