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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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