Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
new to powe bi, i need to compare last year month count to presene year count, if value increase need to show arrow mark should be up, if decrease arrow should be down in conditional formate
when i use date date add, parallell period, privious month it will compare with in the year of month it won't give result last year month screen shot below
pls help me sort out this issue
Solved! Go to Solution.
Hi @Anonymous ,
Use a single slicer and create two measures like below:
current_year_month =
CALCULATE (
COUNT ( 'table'[value] ),
FILTER (
ALLSELECTED ( 'table' ),
'table'[plant] = SELECTEDVALUE ( 'table'[plant] )
&& YEAR ( 'table'[date] ) = YEAR ( SELECTEDVALUE ( 'table'[date] ) )
&& MONTH ( 'table'[date] ) = MONTH ( SELECTEDVALUE ( 'table'[date] ) )
)
)
Last_year_month =
CALCULATE (
COUNT ( 'table'[value] ),
FILTER (
ALLSELECTED ( 'table' ),
'table'[plant] = SELECTEDVALUE ( 'table'[plant] )
&& YEAR ( 'table'[date] )
= YEAR ( SELECTEDVALUE ( 'table'[date] ) ) - 1
&& MONTH ( 'table'[date] ) = MONTH ( SELECTEDVALUE ( 'table'[date] ) )
)
)
Best Regards,
Jay
Hi @Anonymous ,
Use a single slicer and create two measures like below:
current_year_month =
CALCULATE (
COUNT ( 'table'[value] ),
FILTER (
ALLSELECTED ( 'table' ),
'table'[plant] = SELECTEDVALUE ( 'table'[plant] )
&& YEAR ( 'table'[date] ) = YEAR ( SELECTEDVALUE ( 'table'[date] ) )
&& MONTH ( 'table'[date] ) = MONTH ( SELECTEDVALUE ( 'table'[date] ) )
)
)
Last_year_month =
CALCULATE (
COUNT ( 'table'[value] ),
FILTER (
ALLSELECTED ( 'table' ),
'table'[plant] = SELECTEDVALUE ( 'table'[plant] )
&& YEAR ( 'table'[date] )
= YEAR ( SELECTEDVALUE ( 'table'[date] ) ) - 1
&& MONTH ( 'table'[date] ) = MONTH ( SELECTEDVALUE ( 'table'[date] ) )
)
)
Best Regards,
Jay
Hi @Anonymous
try with two slicers, one for the year and one for the month and avoid using hierarchy slicer
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.