Forum Discussion
FlyBoyNight
6 years agoNew Member
Direct Query - 2 Digit Month Insanity
Hi everyone, Really new to Power BI and Dax, so thanks in advance! I'm trying to get 2 digit month using Dax and Direct Query. Ultimately, I am trying to order data visuals correctly, using ...
- 6 years ago
YEAR and MONTH take Date as an argument, with your syntax it's just the number of days starting from 1899-12-31, where 2019 gives year 1905 and 4 gives 1 (January 1900)
You can use eitherDateofServiceYearMonth = RequestSummary[DateofServiceYear]*100 + RequestSummary[DateofServiceMonth]or
DateofServiceYearMonth = YEAR(RequestSummary[DateofService])*100 + MONTH(RequestSummary[DateofService])Personally I would use the first one
Anonymous
3 years agoNot applicable
you can use the function Number.ToText as below
Number.ToText([MonthNumber],"D2")
Mehranmus
2 years agoNew Member
worked, amazing