Forum Discussion
brockry1
1 year agoHelper II
Growth % DAX Command
I'm trying to place a conidional DAX formula to show if the prior year is 0 then show 100% growth other wise divide the current year/prior year -1.
When I add the clause "If(Prior Year) isblank,1,
if prior year>0, divide current year/prior year-1
this is giving me a "False" return and not showing the cell as 100%.
Current formula is "
Growth = IF([Prior Year]>0,
(DIVIDE([Current Year]-[Prior Year],[Prior Year])))
and shows this
Need blank cell to show 100%...what am I doing wrong?
- Growth % =IF(OR([Prior Year] > 0,ISBLANK([Prior Year])),DIVIDE([Current Year] - [Prior Year],[Prior Year],1))
6 Replies
- Selva-SalimiSolution Sage
hi brockry1
although you can simply add 1 at the end of your current formula
Growth = IF([Prior Year]>0, (DIVIDE([Current Year]-[Prior Year],[Prior Year])),1)oradd +0 at the end of your prior calculation, and define the condition based on zero.If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.- brockry1Helper II
It solves for the prior year of 0 equaling 100% however it sorts and shows all the addresses as the same and this isn't true: See screen shot:
- brockry1Helper IIGrowth % =IF(OR([Prior Year] > 0,ISBLANK([Prior Year])),DIVIDE([Current Year] - [Prior Year],[Prior Year],1))
- brockry1Helper II
This was the formula that worked.