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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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