Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

rolling counts are missing for some dates

Dear All,

 

I have created one chart which shows date wise rolling activity counts against the month wise total target for selected months -

but if there is not activity count in particular date then chart line trend is breaking as showing below for 22- March to 25 march.

 

second problem is coming that dates are showing for entire 2020 years but actvities are created only between Feb to April in 2020.

Kindly help me resolving these 2 issues . Below is my measures 

 

fixed activity target = CALCULATE( sum(AD_V_AcreNext_Smart_Planing_Detail[ActivityTarget]) ,ALLSELECTED(AD_V_AcreNext_Activity_Detail))
 
 
 

 

4 Replies

  • Try Like

    fixed activity target = CALCULATE( sum(AD_V_AcreNext_Smart_Planing_Detail[ActivityTarget]) ,ALLSELECTED(AD_V_AcreNext_Activity_Detail)) +0

     

    Have a visual level filter like <= today to stop date

    Or Stop you calendar there

    • Anonymous's avatar
      Anonymous
      Not applicable

      Dear amitchandak  

      I am not able to do it.. Tried many times. 😞

      how to restrict date range only till today?

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi Anonymous 

    1. For your case, you need a dim date table, then use date from date table into a visual.

    Of course, add "+0" in the formula too.

    https://radacad.com/do-you-need-a-date-dimension

    For example:

    Use this formula to create a dim date table

    Date=CALENDAR(MIN(fact[Date]),MAX(fact [Date]))

     

    2. add a conditional as below 

    Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Date'[Date]),MAX('Date'[Date])<=MAX('Table'[Date])))

     

    if you still have problem, please share the sample pbix file for us have a test.

     

    Regards,

    Lin

    • Anonymous's avatar
      Anonymous
      Not applicable

      Dear amitchandak 

      I am trying but not able to do so.

      Attaching the data which I am using. Could you please do it for me.

      It will be great help from your side.

      https://we.tl/t-743nZsjmrg