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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CracktheCode85
Helper II
Helper II

DAX Formula causing Continuous Values For Future and Past Months

Hi There! 

I am once again faced with a strange issue.... I have a calculation for a percentage where the Numerator and Denominator are both formulated to stop at the current month. 

I.E. We will see the correct values in a table for the Num and Denom from January to April 2025. 

 

The issue- when I make this into a percentage and formulate it as such: "%PM = Calculate(1-[Num] / [Denom]) 

I get the correct percentages from Jan to April BUT I also get 100% for May and Beyond.... 

I've tried DATEADD, DATESBETWEEN, and other time functions but none of them seem to work to cut the values off at the current month end (April).

Please help! 

1 ACCEPTED SOLUTION
maruthisp
Super User
Super User

Hi @CracktheCode85 ,

Please find the below DAX expression. It would be good to sahre sample data to work on DAX expression when you are posting. 

%PM =
IF(
NOT( ISBLANK( [Denom] ) ),
1
- DIVIDE( [Num], [Denom] ),
BLANK()
)


Please let me know if you have further questions.

If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

 

Best Regards, 

Maruthi 

LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

View solution in original post

3 REPLIES 3
maruthisp
Super User
Super User

Hi @CracktheCode85 ,

Please find the below DAX expression. It would be good to sahre sample data to work on DAX expression when you are posting. 

%PM =
IF(
NOT( ISBLANK( [Denom] ) ),
1
- DIVIDE( [Num], [Denom] ),
BLANK()
)


Please let me know if you have further questions.

If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

 

Best Regards, 

Maruthi 

LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

Hey Maruthisp! 

That did the trick! The Current Month of MAY still shows 100% but I can work with that. 


I'm not sure I fully understand how or why it worked...  would you mind providing a breakdown of how that formula works with the Blanks? 


Ashish_Excel
Super User
Super User

Hi,

Does this measure work?

Measure = if(isblank([Num]),blank(),divide(([Num]-[Denom]),[Denom]))

Hope this helps.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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