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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
Community Champion
Community Champion

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.