Forum Discussion

arlequin71's avatar
arlequin71
Helper II
8 years ago
Solved

Newbie Question - Time Intelligence Measures Issues

Hello, 

I have tried to display MTD, QTR and YTD measures but as shown in the attached image the returned value is zero.  Only when i applied some custiomized time filters values are displayed correctly.  Eventhough if i use a filter for 2018 MTD and QTR measures returns Zero.

 

If i apply the same measures to a table they shows correct values. 

 

Is there any variable i need to set to display these measures correctly?.

 

Thanks in advance,


Alex-

  • Going to need more info to help. Can you share your measures and a picture of the data model?  What period are you trying to show MTD, QTD and YTD in the CARD visuals for? If you want it for now() you will need to write a measure to force some filter context. 

     

    My guess is your measure with the unconstrained filter contect in the Card Visual its using the MAX date in your date table which is way in the future where there is no data.  If your using a straight DAX solution try using the predifined TOTALQTD, TOTALMTD and TOTALYTD functions or are you a raw DAX solution

     

    MTD Sales = 
    CALCULATE (
          [Total Sales],
          FILTER (
               ALL ( 'DateTable' ),
                    'DateTable'[DateYear] = MAX ( 'DateTable'[DateYear] ) &&
                    'DateTable'[DateMonth] = MAX ( 'DateTable'[DateMonth] ) &&
                    'DateTable'[Date] <= MAX ( 'DateTable'[Date] ) 
       )
    )

     

2 Replies

  • Going to need more info to help. Can you share your measures and a picture of the data model?  What period are you trying to show MTD, QTD and YTD in the CARD visuals for? If you want it for now() you will need to write a measure to force some filter context. 

     

    My guess is your measure with the unconstrained filter contect in the Card Visual its using the MAX date in your date table which is way in the future where there is no data.  If your using a straight DAX solution try using the predifined TOTALQTD, TOTALMTD and TOTALYTD functions or are you a raw DAX solution

     

    MTD Sales = 
    CALCULATE (
          [Total Sales],
          FILTER (
               ALL ( 'DateTable' ),
                    'DateTable'[DateYear] = MAX ( 'DateTable'[DateYear] ) &&
                    'DateTable'[DateMonth] = MAX ( 'DateTable'[DateMonth] ) &&
                    'DateTable'[Date] <= MAX ( 'DateTable'[Date] ) 
       )
    )

     

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

    Hi arlequin71

    What does your dataset looks like?

    The screenshot is correct or not?

    Does the zero exsit for there is no value during the whole month or due to an error?

     

    Best Regards

    Maggie