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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
extri13
Helper I
Helper I

[DAX] Format function seems not working

Dear all,

 

Format function seems not working like below capture screens.

Would anyone please clear which is wrong ; me or Power Bi?

Below is my purpose and problem details.

 

Purpose

  • Want to show week numbers continued by last week of last year on X-axis (i.e. '15 W51  |  '15 W52  |  '16 W1  |  '16 W2 )
  • Try to Concatenate the Year and Week numbers for using X-axis
  • Try to change Year and Week numbers to text for using Concatenate parameters 

Problems

  • The function Format in DAX does not work rightly like below
  • Parameter "G" as General Number changes all the number to string just "G" (Figure #1)
  • Parameter #### as 4 digit numbers returns error message (Figure #2)

 

Figure #1

DAX_Function_Format 2.PNG     

 

Figure #2

 DAX_Function_Format.PNG

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @extri13,

Firstly, there are several syntax errors in your formula, please change it to the following formula.

TEST = FORMAT( [no], "General Number") 
Capture1.PNG

Secondly, do you want to pick the last 4 digit numbers from your column in the second screenshot? If that is the case, you can use the following formula.

Test = RIGHT( [no], 4) 
Capture.PNG


However, if the above formula doesn’t meet your requirement, please describe more details about which format of data you want to return.

In addition, for more details about how to use Format function, please review the following articles.
https://msdn.microsoft.com/en-us/library/ee634924.aspx
https://msdn.microsoft.com/en-us/library/ee634561.aspx

Thanks,
Lydia Zhang

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @extri13,

Firstly, there are several syntax errors in your formula, please change it to the following formula.

TEST = FORMAT( [no], "General Number") 
Capture1.PNG

Secondly, do you want to pick the last 4 digit numbers from your column in the second screenshot? If that is the case, you can use the following formula.

Test = RIGHT( [no], 4) 
Capture.PNG


However, if the above formula doesn’t meet your requirement, please describe more details about which format of data you want to return.

In addition, for more details about how to use Format function, please review the following articles.
https://msdn.microsoft.com/en-us/library/ee634924.aspx
https://msdn.microsoft.com/en-us/library/ee634561.aspx

Thanks,
Lydia Zhang

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.