Add leading 0 (zero) to month number in power BI

0 votes

I want a DAX formula that is concatenating a month number to a year.

If the month number is less than 10, I want to add a leading zero to it but I'm new to DAX and I can't seem to figure out how to do it?

Oct 7 in Power BI by anonymous
• 6,030 points
77 views

1 answer to this question.

0 votes

You can use the FORMAT function for this:

Expiry_MonthYear_Sorter = FORMAT([Expiry_Date], "YYYYMM")
answered Oct 7 by Gitika
• 48,800 points

Related Questions In Power BI

0 votes
1 answer

How to add roles in power BI?

1. Go to Modelling ribbon -> Manage ...READ MORE

answered Oct 30, 2019 in Power BI by ch
• 3,450 points
383 views
0 votes
1 answer

How to add image in Power BI Report?

Follow the below steps: Create a column with ...READ MORE

answered Oct 31, 2019 in Power BI by Cherukuri
• 32,490 points
3,890 views
0 votes
1 answer

How to add an extra column to the existing table in power bi query editor?

Hi, To create a custom column, we need to ...READ MORE

answered Feb 3 in Power BI by Rajan
11,399 views
+1 vote
1 answer

Is there a way to convert JSON data to readable table in power bi

Follow these steps step 1 - Click on ...READ MORE

answered Sep 24, 2018 in Power BI by Hannah
• 18,410 points
8,945 views
0 votes
1 answer

How to get month name from month number in Power BI?

You can use: MonthName = FORMAT(DATE(1, [Num], 1), ...READ MORE

answered Sep 24 in Power BI by Alisha
39 views
0 votes
1 answer
0 votes
1 answer

How to ignore a slicer for one measure, but apply it on another?

In order to ignore Slicer you need ...READ MORE

answered Oct 1 in Power BI by Gitika
• 48,800 points
219 views
0 votes
1 answer

How to replace Blank with "0" in Power BI Visual?

Hi, Sujit You can do this in two ...READ MORE

answered Feb 7 in Power BI by Gitika
• 48,800 points
13,771 views
0 votes
1 answer

How to add a One drive Excel as a Data set in Power BI?

If the one Drive is from your ...READ MORE

answered Oct 29 in Power BI by anonymous
• 48,800 points
42 views