Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Add 3 days more to date selection

Hi all, 

 

Anyone knows how to add the a three days + range, based on user selections on 'Date Début effective' ? 

Cheers 

 

 

% Onboarding =
var Date1 = CALCULATE(SELECTEDVALUE(Table1[Date Début Effective]))
var Date2 = CALCULATE(SELECTEDVALUE(Table1[Date Fin Effective]))
Return
IF(SELECTEDVALUE(t_Datas[Date])=Date1;
Calculate(
DIVIDE([M_Filter_MissionID S04] ; [M_Count_MissionID]))
  • Hi Anonymous ,

    Do you want to achive this output below? If we select the date in date slicer, the card visual will show the date of the date we selected +3.

    If that is your case, you could use the formula.

    Measure = CALCULATE(SELECTEDVALUE(Sheet9[Date]))+3

    If you still need help, please share your data sample and your desired output so that we can help further on it.

    Best Regards,

    Cherry

     

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    You mean like:

     

    % Onboarding = 
    var Date1 = CALCULATE(SELECTEDVALUE(Table1[Date Début Effective])) + 3
    var Date2 = CALCULATE(SELECTEDVALUE(Table1[Date Fin Effective]))
    Return
    IF(SELECTEDVALUE(t_Datas[Date])=Date1; 
    Calculate(
    DIVIDE([M_Filter_MissionID S04] ; [M_Count_MissionID]))

    ?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg,

       

      That was in fact my first attempt. However, I do not get the expected result.

      It just keeps retrieving 3 if I add '.MonthNo' or '02-01-1900 00:00:00'.

      What am I doing wrong ? 

       

      Thank you so much! 

       

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Can anyone help me please? 

      It's increasing the days and not the months as it's supposed to. 

      THANKS ! 

       

      FORMULA: 

      S06 Teste =
      CALCULATE(SELECTEDVALUE(t_Missions[Date Début Effective]))+3
       
       
    • Anonymous's avatar
      Anonymous
      Not applicable

      i Greg, 

       

      More useful information: 

       

      1) dont seem to be able to convert the new column into a "Whole Number" so that then I can "+3"

       

       

       

       

      2) Doing the exact same for my Date column in my calendar table and works as a charm. 

       

       

      3) Both columns have the same date format. 

       

      Is there a reason for this awkward behaviour? I sometimes dont get the engine behind. 

       

      Cheers.

       

      • v-piga-msft's avatar
        v-piga-msft
        Icon for Resident Rockstar rankResident Rockstar

        Hi Anonymous ,

        Have you solved your problem?

        If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

        If you still need help, please feel free to ask.

        Best  Regards,

        Cherry

         

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi Anonymous ,

    Do you want to achive this output below? If we select the date in date slicer, the card visual will show the date of the date we selected +3.

    If that is your case, you could use the formula.

    Measure = CALCULATE(SELECTEDVALUE(Sheet9[Date]))+3

    If you still need help, please share your data sample and your desired output so that we can help further on it.

    Best Regards,

    Cherry