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
tmendoza
Helper III
Helper III

Help with Calculate Formula (adding -1 to filter is not working)

Hello DAXers,

 

Can anyone tell me why this works:

CALCULATE(SUMX(GL,GL[Actual Amount]),GL[Category] IN {"HC","FTE"}, GL[SnapShot] = GL[SnapShot] )
But this doesn't:
CALCULATE(SUMX(GL,GL[Actual Amount]),GL[Category] IN {"HC","FTE"}, GL[SnapShot] = GL[SnapShot]-1 )
And can anyone offer me a solution that will make this DAX formula work?
SnapShot is a column of Data type: Decimal Number and Format: Whole Number.
I've tried using the INT command and the latter of the two formulas still doesn't work. It just draws a blank.
 
Thanks!!!
2 REPLIES 2
Nathaniel_C
Super User
Super User

Hi @tmendoza ,

What are you trying to do with this?

GL[SnapShot] = GL[SnapShot]-1 )





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello there,

 

SnapShot is a value that expresses a period. ex. 202001, 202002, 202003, 202004 etc.

I want my measure to give me the amount for the prior period being looked at. 

So if my slicer was to show 202003, then my measure would give me the amount for 202002. Thus, the [SnapShot]-1 Jazz.

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.

Top Solution Authors