Forum Discussion
Anonymous
4 years agoNot applicable
DAX Comparing counts from two different snapshots
Hi all, This should be quite straightforward, but I can't seem to be able to debug it yet... I have a series of data called 'Opportunities' that are recorded in an excel spreadsheet. Opp...
- 4 years ago
Hi Anonymous ,
I'm not sure what you want to achieve:
Do you want to compare the values between the LATEST day available in a table and a day you choose in a slicer?
If so:
LatestDateCount = VAR LatestDate = MAXX ( ALL ( 'Table' ), 'Table'[Date Captured] ) VAR LatestDateCount = CALCULATE ( [Opportunties_Count], 'Table'[Date Captured] = LatestDate ) RETURN LatestDateCountEarlierDateCount = VAR EarlierDate = SELECTEDVALUE ( 'Table'[Date Captured] ) VAR EarlierDateCount = CALCULATE ( [Opportunties_Count], 'Table'[Date Captured] = EarlierDate ) RETURN EarlierDateCountIf this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Many thanks amitchandak
Your suggestion seems to work in principle, but doesn't seem to work when I use a slicer for the past date.
In such case, the middle comparison table gets the previous date values, and the bottom table (previous date values) becomes blank.
Not sure what's the problem...