Forum Discussion
DAX Measure to count only latest transaction
- 6 years ago
Hi mturcotte ,
You could create the following three measures to get the result:
CountID = VAR a = IF ( SELECTEDVALUE ( 'Table'[Date] ) = CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[User_Id] ) ), 1, 0 ) RETURN COUNTX ( 'Table', a )Status = VAR a = IF ( SELECTEDVALUE ( 'Table'[Date] ) = CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[User_Id] ) ), 1, 0 ) RETURN aTotalCount = SUMX('Table',[Status])Here is the result :
Here is my test file for your reference.
Still unable to share a link to either OneDrive or to GoogleDrive…
This forum is wonderful to search and find answers but TERRIBLE to post questions...
I also posted about a BUG on PBIRS May 2019 in the Report Server section and on Ideas (as a suggestion to fix it), yet it remains in both the September 2019 and the subsequent October 2019 release (that patched other bugs but not the one I had provided great details on)... MOST disappointing!
Anyway, should anyone want access to the Report mockup I created to illustrate my DAX challenge without compromising sensitive data, just send me an email at mturcotte --at-- atip-solutions.com
Thanks!
https://1drv.ms/u/s!ArclD4PLnaKAnxwSjb_r-cCDuUBJ?e=2W0ULd
This time I succeeded in posting a link but using Chrome and connected from my account from customer's email system.
Go figure, but I'm still looking for help about the DAX measure to selectively count last boolean value and ignore preceeding ones for each user.
Thanks, MT