Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Yuriy-Agri
New Member

My DAX in Excel powerpivot does not understand numbers

YuriyAgri_0-1725896967289.png

When I put this minus 1 or any other number the formula does not regard it as a number. 
Only one way to force it t work is to put {}, then everything work.

YuriyAgri_1-1725897084377.png

But it is not how it should be. 
In Power BI everything works as shall be without any {}
What is wrong with my Excell 365 ?

1 ACCEPTED SOLUTION

Hi @Yuriy-Agri 

I see that your regional settings have the comma as the decimal separator.

 

I was able to replicate the behaviour you're seeing by switching my Window Region/Format from my usual  "English (New Zealand)" to "English (Germany)" to enable the comma decimal separator.

OwenAuger_1-1726916669701.png

It seems that with these regional settings, when authoring DAX expressions in the Power Pivot interface, commas can be treated either as decimal separators or list separators depending on the context.

 

  1. When a comma immediately follows digits in such a way that it could be a valid decimal separator, it is interpreted as a decimal separator.
  2. Otherwise, it is interpreted as a list separator.

Assuming you want to leave your Region/Format settings unchanged, it seems that for any expression that contains a number with no decimal places followed by a list separator, you must ensure some other character is inserted between the number and the list separator.

 

This character can simply be a space, an extra comma to act as a redundant decimal separator, or you could wrap the number in brackets or even a table constructor as you have already tried.

So all of these expressions should work:

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > 5 , "true", "F" )

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > 5,, "true", "F" )

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > (5), "true", "F" )

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > {5}, "true", "F" )

 

 

Do I think this is buggy? Yes, because I was under the impression that comma decimal separators went hand-in-hand with semicolon list separators, just as they do in Excel formulas.

 

I'll look into querying this with Microsoft and reporting as a bug, and you may want to as well. I'll post back if I learn anything else.

 

Regards

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

4 REPLIES 4
Yuriy-Agri
New Member

No, it is not working. 
It looks like DAX formulas in my Excel 365 understand numbers/dot/coma incorrectly. I made another test workbook.

YuriyAgri_2-1726835700574.png

And if I put the curve brackets around 5, then the formula works well.

YuriyAgri_1-1726835642914.png

And the same DAX formula works ok in Power BI

Hi @Yuriy-Agri 

I see that your regional settings have the comma as the decimal separator.

 

I was able to replicate the behaviour you're seeing by switching my Window Region/Format from my usual  "English (New Zealand)" to "English (Germany)" to enable the comma decimal separator.

OwenAuger_1-1726916669701.png

It seems that with these regional settings, when authoring DAX expressions in the Power Pivot interface, commas can be treated either as decimal separators or list separators depending on the context.

 

  1. When a comma immediately follows digits in such a way that it could be a valid decimal separator, it is interpreted as a decimal separator.
  2. Otherwise, it is interpreted as a list separator.

Assuming you want to leave your Region/Format settings unchanged, it seems that for any expression that contains a number with no decimal places followed by a list separator, you must ensure some other character is inserted between the number and the list separator.

 

This character can simply be a space, an extra comma to act as a redundant decimal separator, or you could wrap the number in brackets or even a table constructor as you have already tried.

So all of these expressions should work:

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > 5 , "true", "F" )

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > 5,, "true", "F" )

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > (5), "true", "F" )

 

 

Test_measure := IF ( SUM ( Test_table[Amount] ) > {5}, "true", "F" )

 

 

Do I think this is buggy? Yes, because I was under the impression that comma decimal separators went hand-in-hand with semicolon list separators, just as they do in Excel formulas.

 

I'll look into querying this with Microsoft and reporting as a bug, and you may want to as well. I'll post back if I learn anything else.

 

Regards

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn
v-xianjtan-msft
Community Support
Community Support

Hi @Yuriy-Agri 

 

I have not encountered the same problem as you in my testing.
Please try checking the following to see if it resolves it.
1. Make sure the DAX formula has no syntax errors and references the column names correctly.
2. Try updating Excel to the latest version.
If the problem persists, please go to the Excel forum Welcome to the Excel Community - Microsoft Community Hub for professional support.

vxianjtanmsft_0-1725934332540.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @Yuriy-Agri 

 

Just a friendly follow up on the case. May I know if the problem has been resolved?

If you have any Power BI related problems, please feel free to contact me.

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.