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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
Is there a better way to test for a whole number than the below? I can't help but think there simply HAS to be a built-in function?
= if Number.Mod([Task ID], 1) = 0 then true else false
Solved! Go to Solution.
Hi @michellepace ,
You can create a custom column like this:
= Table.AddColumn(#"Changed Type", "Custom", each if [Task ID] = Int64.From([Task ID]) then true else false)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can use Value.Is:
Table.AddColumn(PriorStep, "Whole Number", each Value.Is([Task ID], Int64.Type))
Or if you need it as a filter, you can also use "if" syntax
if Value.Is([Task ID], Int64.Type) then xxx else yyy
--Nate
Hi @michellepace ,
You can create a custom column like this:
= Table.AddColumn(#"Changed Type", "Custom", each if [Task ID] = Int64.From([Task ID]) then true else false)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The logic is the same but you can get rid of the IF:
Number.Mod([TASKID],1)=0________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 17 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |