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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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