Reply
Frequent Visitor
Posts: 3
Registered: ‎04-05-2018
Accepted Solution

Filling with zero values in each cell so they all have the same 4-digit-format

I want to create a link between two tables but therefor onze of the cell's of table 1 should be figured as "0001", "0020"... iso '1", "20"... Anyone that can help me?.. Tx in advance!

 

- in table 1 i have the year '2017' the book "OP" and the documentnummer '1', '20',...

- in table 2 i have the bookingdocument "2017OP0001", "2017OP0020",...

 

I wanted to ad the excelfile and PBI-file but i do not know how to manage that... :-(

 


Accepted Solutions
Highlighted
Regular Visitor
Posts: 29
Registered: ‎03-02-2018

Re: Filling with zero values in each cell so they all have the same 4-digit-format

since you would need to do this is M, you could do something like:

 

=Text.End(000 & [documentnumber], 4)

View solution in original post

Moderator
Posts: 9,523
Registered: ‎03-10-2016

Re: Filling with zero values in each cell so they all have the same 4-digit-format

@Misha,

You can also create calculated columns using DAX below.

Column = FORMAT(Table[document number],"0000")
Combined column = Table[Year] & Table[Book] & Table[Column]

1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post


All Replies
Highlighted
Regular Visitor
Posts: 29
Registered: ‎03-02-2018

Re: Filling with zero values in each cell so they all have the same 4-digit-format

since you would need to do this is M, you could do something like:

 

=Text.End(000 & [documentnumber], 4)
Moderator
Posts: 9,523
Registered: ‎03-10-2016

Re: Filling with zero values in each cell so they all have the same 4-digit-format

@Misha,

You can also create calculated columns using DAX below.

Column = FORMAT(Table[document number],"0000")
Combined column = Table[Year] & Table[Book] & Table[Column]

1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.