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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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