Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Sachet_716
Helper I
Helper I

CY vs LY measure

hi guys, 

 

Need some help from the experts, i am preparing a report whihc shows current year and last year sales. But when i calculated the delta, it is showing me results of stores even if they dont have data for this year. How can i make it calculate only for stores whihc has sales this year? Here's my table. I only want to have data for Store 3 & 6.

 

Thanks!!

Che

 DAX.jpg

 

 

 

 

 

1 ACCEPTED SOLUTION
Thejeswar
Super User
Super User

Hi @Sachet_716,

Try the below DAX

 

Measure = IF(Table[Last Year Sales Value]=" ", " ", "your Logic for CY Vs. LY")

This will give Blank SPace whenever Last Year Sales Values is ""

View solution in original post

4 REPLIES 4
Thejeswar
Super User
Super User

Hi @Sachet_716,

Try the below DAX

 

Measure = IF(Table[Last Year Sales Value]=" ", " ", "your Logic for CY Vs. LY")

This will give Blank SPace whenever Last Year Sales Values is ""

thanks @Thejeswar, got it!  🙂

Welcome!! A Kudos along with accepting the solution would have been better!!! Smiley Very Happy

Smiley Very Happy

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors