Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!!
I have a question about IF en DAX, I hope someone could helpme
I have this values
10000
345.67
897.01
100
750
783
321.45
890.5
0
etc
I want to check if the number afther the . (dot) is 00 and im trying with this,
Value.00 = IF(MOD('MyTable'[TOTAL],SIGN('MyTable'[TOTAL))=00,1,0)
but I have this error:
Division by zero has occurred when evaluating function 'MOD'.
Are not sure what others options can use.
Thanks for the help
Mónica
Solved! Go to Solution.
Hi Mónica,
Try this formula, please.
Column = IF ( SEARCH ( ".", [Value],, 9999 ) = 9999, 1, IF ( RIGHT ( [Value], 2 ) = "00", 1, 0 ) )
Best Regards,
Dale
Hi @Anonymous
Try this:
Column = IF(RIGHT(Table[Total,2)="00", 1,0)
Thanks
Raj
Hi @Anonymous
Thanks for your reply.
This option doesnt work for me, because the numbers like
1000
750
dont show the .00 but its has it.
with this opcion only show me the 1000 and the 750 dont show me, but should it.
Thanks again
Monica
I'm sure there are lots of ways to do this.
You could try the Quotient function like QUOTIENT(scores[Num1],1) to get the number on the LHS of the decimal point.
Then subtract that number from the original. If the result is zero then the condition (i.e is it a whole number) is true.
I don't know whether you are effectively testing for a whole number or whether you also consider the condition true for numbers like 5.001
You can change the algorithm slightly to cope with these numbers
I hope your data type is decimal, so if you set the number of decimal to 2, you will have 1000.00, 745.34.And ths formula will work.
Please let me know if you see any issues.
Thanks
Raj
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |