Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am trying to divide two text columns for a particluar dimension. So i get error when the numerator or denominator has blank value. I went forward and added if clause as below but i still get below error .
Kindly sugest
Solved! Go to Solution.
@pmadam Maybe:
XY =
IF(
ISBLANK([DSAM Amount]) && Not(ISBLANK(VALUE([Customer Target]))),
0 ,
[Customer Target] / [DSAM Amount]
)
Hi @Greg_Deckler ,
I get error. These measures are in text because when i added comma seperator, the measures were converted to type int to text.
@pmadam Maybe:
XY =
IF(
ISBLANK([DSAM Amount]) && Not(ISBLANK(VALUE([Customer Target]))),
0 ,
[Customer Target] / [DSAM Amount]
)
@pmadam you have the wrong syntax for DIVIDE:
@Greg_Deckler 's code: XY =DIVIDE( [Customer Target], [DSAM Amount], 0 )
Your code: XY =DIVIDE( [Customer Target] / [DSAM Amount] ,0 ).
Even if you didn't throw an error with one of your "numbers" being empty, you are dividing by 0.
Hope this helps
David
Hi @pmadam ,
Are bot of your columns numeric which you are trying to divide.
DIVIDE is function that works on non-text values. If you think logically, how can you divide a text value by a numeric value.
Try modifying data type of your text column used in DIVIDE function to Numeric.
Thanks,
Pragati
@pmadam Use the DIVIDE function like this (get rid of the IF clause)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |