Forum Discussion
ianallen13V2
1 year agoRegular Visitor
Dual Slicing
Hello, I have a request and I'm not sure if it is possible, but my company currently is running an older version of PBI (2022) at the moment (looking to upgrade shortly), but they want a report ...
- Anonymous1 year ago
Hi ianallen13V2 ,
Maybe you can try formula like below:
Current= VAR sel_year = SELECTEDVALUE ( 'Date'[Year] ) VAR sel_month = SELECTEDVALUE ( 'Date'[Month] ) RETURN IF ( ISFILTERED ( 'Table' ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALL('Table'), YEAR ( 'Table'[Date] ) = sel_year && MONTH ( 'Table'[Month] ) = sel_month ) ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALL('Table'), YEAR ( [Date] ) = YEAR ( TODAY () ) && MONTH ( [Date] ) = MONTH ( TODAY () ) ) ) )Previous= VAR sel_year = SELECTEDVALUE ( 'Date'[Year] ) VAR sel_month = SELECTEDVALUE ( 'Date'[Month] ) RETURN IF ( ISFILTERED ( 'Table' ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALL('Table'), YEAR ( 'Table'[Date] ) = sel_year && MONTH ( 'Table'[Month] ) = sel_month ) ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALL('Table'), YEAR ( [Date] ) = YEAR ( TODAY () ) - 1 && MONTH ( [Date] ) = MONTH ( TODAY () ) ) ) )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AndrewBell
1 year agoNew Member
I'm also using an older version, I'm satisfied with it.