Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arlequin71
Helper II
Helper II

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-

Screen Shot 2018-07-19 at 17.25.25.png

1 ACCEPTED SOLUTION
Seward12533
Solution Sage
Solution Sage

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] ) 
   )
)

 

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
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

Seward12533
Solution Sage
Solution Sage

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] ) 
   )
)

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.