Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have a small issue: my dataframe contains two columns - OrderedQuantity and DeliveredQuantity which contains decimal and integer values. I need to make a new column like this:
=0 in those rows where OrderedQuantity and DeliveredQuantity has integer values
= OrderedQuantity-DeliveredQuantity where OrderedQuantity and DeliveredQuantity has decimal values.
I was thinking about using ROUND() function:
= if [OrderedQuantity]<>ROUND(OrderedQuantity,0) and ... then [OrderedQuantity]-[DeliveredQuantity]
But it is not working. Can someone suggest other solution?
Thank you a lot
Hi SkaistePapuskai,
I tried the round function and it works, please try the formula when creating the column:
Column = if(value(Sheet1[Sales])<>round(Sheet1[Sales],0)&&value(Sheet1[Sales1])<>round(Sheet1[Sales1],0),
Sheet1[Sales]-Sheet1[Sales1],
0)
See the result:
If any further help needed, please feel free to post back.
Regards
If you don't need the decimals at all, you can format the data type of your columns to "WHOLE NUMBER".
@SkaistePapuskai Created calculated column as below,
= IF( IFERROR(SEARCH(".",YOUR COLUMN),0) > 0, RESULT IF DECIMAL, RESULT IF INTEGER )
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 51 | |
| 39 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 81 | |
| 34 | |
| 29 | |
| 25 |