0

I'm trying to change the x axis format that now for ex. looks like this 201601012300 by right click on the x axic prop, number and choose the format (I try different formats). Strangely but it's not working. Just to be sure, when i change the font, it's responding that how i Know that i select the wright axis prop.

Sara
  • 19
  • 5

2 Answers2

0

Maybe, you can try with Expression and force the display format like this : =Format(Fields!MyDate.Value, "MM/dd/yyyy")

C. Chagnon
  • 24
  • 4
  • Just to be sure, the type of x axis values is DateTime ? – C. Chagnon Apr 11 '16 at 08:01
  • I'm taking this member: WITH MEMBER MEASURES.TheDate AS [Dim Time Online].[Date Key].currentmember.name. I'm not very strong at SSAS. Is this a date format? – Sara Apr 11 '16 at 08:31
  • I think you have a string value because you return the current member name, not the value.. Did you try (without .name): WITH MEMBER MEASURES.TheDate AS [Dim Time Online].[Date Key].currentmember – C. Chagnon Apr 11 '16 at 08:55
  • Now i change it to CURRENTMEMBER.member_value and it still not working. By the way, when i change at axis options to scalar axis it starting to react. but still not giving me the right format – Sara Apr 11 '16 at 09:07
  • Having a string value to convert in DateTime format is a little laborious in SSRS but with your exemple "201601012300", I have "01/01/2016 23:00" with this expression : =format( CDate( Mid(Fields!Day.Value,5,2) & "/" & Mid(Fields!Day.Value,7,2) & "/" & Left(Fields!Day.Value,4) & " " & Mid(Fields!Day.Value,9,2) & ":" & Right(Fields!Day.Value,2) & ":00"), "MM/dd/yyyy HH:mm") – C. Chagnon Apr 11 '16 at 09:35
  • unfortunatly It disrupts the data: instead 201602152300 i'm geting : 2016021522/15/2316 23:00 – Sara Apr 11 '16 at 09:54
  • Mid(value, 5, 2) return more than 2 characters ?.. Very weird ! Can you show me your expression please ? – C. Chagnon Apr 11 '16 at 11:47
  • Yes, this very wierd. This is the expression without time: =Mid(Fields!TheDate.Value,5,2) & "/" & Mid(Fields!TheDate.Value,7,2) & "/" & Left(Fields!TheDate.Value,4) – Sara Apr 11 '16 at 11:56
  • I tried your expression in my own report and it works fine.. :( With a string "201602152300", I have : 02/15/2016 – C. Chagnon Apr 11 '16 at 13:06
  • What is the result if you put only =Mid(Fields!TheDate.Value,5,2) in the expression ? – C. Chagnon Apr 11 '16 at 14:29
  • The resault is: 2016021523002. I assume that the issue is with the variable of MDX 'cous always give the default string 201602152300 and the cur part – Sara Apr 12 '16 at 05:59
0

This is most likely caused because your date field is not in the date format. I had this exact issue and this resolved it.

Nick Momin
  • 183
  • 3
  • 13