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
Hi Anonymous
Im almost there I think, however, I think I need that last nudge.
It doesnt show any numbers unfortunately, even though it is a volume difference. See screenshot.
I have uploaded the pbix file for reference, I guess its easier to understand instead of using a simple example as I used in my first post.
Link: File on Onedrive
tonijj
7 years agoHelper IV
Anonymous Any ideas?
- Anonymous7 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