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
sarjensystems1
Helper III
Helper III

Filter the current month

Hello All,

 

Need help,

We are getting current year values and last year values, but in current year values we don't have current month values, At the time of "% change" calculation we are getting values as 100% for current month.  we need to show '0' or remove this month from the dax.
For LY Direct Dax is "LY Direct = CALCULATE([Total Net Sales],SAMEPERIODLASTYEAR(Calender[Date]))"
How to achieve this in dax.

 

 current Year.PNG

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @sarjensystems1 ,

You could use the following measure:

% Increase_Direct Sales_2=if([% Increase_Direct Sales_1]=-100.00,0,[% Increase_Direct Sales_1])

 

You can also take the var approach and write this  directly in the % Increase_Direct Sales_1 measure.

 

Wish it is helpful for you!

 

 

Best Regards

Lucien

 

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @sarjensystems1 ,

You could use the following measure:

% Increase_Direct Sales_2=if([% Increase_Direct Sales_1]=-100.00,0,[% Increase_Direct Sales_1])

 

You can also take the var approach and write this  directly in the % Increase_Direct Sales_1 measure.

 

Wish it is helpful for you!

 

 

Best Regards

Lucien

 

Fowmy
Super User
Super User

@sarjensystems1 

Add an if condition to check if LY or CY has blank then show Blank else calculate the change:

% Increase_Direct Sales_1 = 

IF(
    ISBLANK([Total Net Sales]) || ISBLANK([LY Direct]),
    BLANK(),
    //Enter your formula for %Change
)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.