Forum Discussion
tonijj
7 years agoHelper IV
Compare Data within the same table
Hi, I just got stuck on an issue, that I guess should be easy, but I just cant seem to solve it. I have searched the forum and tried several of the threads out there, but…just no luck ☹ So, I have ...
tonijj
7 years agoHelper IV
Anonymous Any ideas?
Anonymous
7 years agoNot applicable
- tonijj7 years agoHelper IV
- Anonymous7 years agoNot applicable
Hi tonijj,
After play with your sample file, I found you modify my formula and use 'current date' to compare with 'current date'.
I modify the formula to let it works, please try to use following measure formulas if it suitable for your requirement:
MOM Diff = VAR currDate = MAX ( DateTable[DateKey] ) VAR currTotal = CALCULATE ( SUM ( DetailedVolumes[Volume] ), FILTER ( ALLSELECTED ( DetailedVolumes ), MONTH ( [DateKey] ) = MONTH ( currDate ) ), VALUES ( Services[SIN] ) ) VAR prevTotal = CALCULATE ( SUM ( DetailedVolumes[Volume] ), FILTER ( ALLSELECTED ( DetailedVolumes ), MONTH ( [DateKey] ) = MONTH ( currDate ) - 1 ), VALUES ( Services[SIN] ) ) RETURN IF ( prevtotal <> BLANK (), currTotal - prevTotal )Regards,
Xiaoxin Sheng
- tonijj7 years agoHelper IV
That is just perfect, works like a charm!
Thanks so much for the help!
Now, if possible, please forward the feedback internally that something like this should be available as a quick measure in future releases :)