The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
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
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
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?
Hi,
Does this measure work?
Measure = if(isblank([Num]),blank(),divide(([Num]-[Denom]),[Denom]))
Hope this helps.
User | Count |
---|---|
81 | |
74 | |
42 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |