Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 70-779 topic 1 question 41 discussion

Actual exam question from Microsoft's 70-779
Question #: 41
Topic #: 1
[All 70-779 Questions]

You add two tables named Date and Invoices to a data model. Invoices contains a column named InvoiceDate that has a data Type of Date. Date contains a column named DateID that has a Data Type of Whole Number. DateID is in the format of YYYYMMDD.
You need to create a relationship between Date and Invoices.
What should you do first?

  • A. Change the Data Type of InvoiceDate and DateID to Text
  • B. Create a calculated column in Invoices that uses the FORMAT DAX function
  • C. Change the Data Type of DateID to Date
  • D. Create a measure in Invoices that uses the FORMAT DAX function
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
References:
https://support.office.com/en-us/article/data-types-in-data-models-e2388f62-6122-4e2b-bcad-053e3da9ba90?ui=en-US&rs=en-
US&ad=US#__toc319430522

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
imran
Highly Voted 4 years, 6 months ago
b IS CORRECT
upvoted 30 times
SPG
4 years, 3 months ago
You can get the right format with FORMAT(Invoices[InvoiceDate], "YYYYMMDD") but the result will be a text column, you can't create a relationship between a text column and an integer column. So it should be C
upvoted 5 times
las
4 years, 1 month ago
The question was what to do first. The second step would be to change the type to text or integer.
upvoted 1 times
...
...
...
mika2
Highly Voted 4 years, 8 months ago
I tried C but the given number format couldnt be transformed to a date format .. So i go with B
upvoted 13 times
...
DonovanSey
Most Recent 3 years, 2 months ago
C can work if you do the following: 1: Navigate to Power Query for the table 2: Change the date column type to Text. 3: Change the date column type to Date. Note: In case you have zero-values in your data (00000000), replace the 00000000 values with blank values, i.e. leave empty (this can be done in Transform tab --> Replace Values)
upvoted 2 times
...
iaaqq
3 years, 3 months ago
Infinitive ans is C : it's not recommand to use a calculated column with DAX, for optimisation you can can transform the column dateID to a date type: Date.FromText(Text.From([colone]))
upvoted 1 times
...
kannn
3 years, 5 months ago
correct answer is B
upvoted 1 times
...
CDL
3 years, 6 months ago
I have to say, both B + C correct.(both Tested) 1. in Data Model, add a DAX calculated column(not measure) in Date Table(not in invoice Table): =FORMAT(DateFormat[Date], "mm/dd/yyyy"); 2. in PQ Editor, also Date Table into Query, change typr from "whole#" --> "Text" --> "Date".
upvoted 1 times
sjonghe
3 years, 5 months ago
What you say is 100% correct, only answer C is totally not saying to convert it first into "text" before changing datatype into "date". So only B is a correct solution.
upvoted 1 times
...
Tancredii
3 years, 4 months ago
Agreed. B is more correct solution for the problem at hand, even if bad practice. C will work if you first change to Text, then change to Date as separate step, but there is no mention of the ability to take multiple steps.
upvoted 2 times
...
...
CDL
3 years, 6 months ago
I have to say, both B + C correct.(both Tested) 1. in Data Model, add a DAX calculated column: =FORMAT(DateFormat[Date], "mm/dd/yyyy"); 2. in PQ Editor, [dateID], change typr from "whole#" --> "Text" --> "Date".
upvoted 1 times
...
CDL
3 years, 6 months ago
C, tested. 1. Import into PQ editor, Step1. Change “YYYYMMDD” to format “text”. Step2. Change “text” to “Date” 2. Load to data model to replace original table “Date”. 3. Create relationship between PQ exported “Date” & “invoiced” in Data Model View under “diagram View”.
upvoted 1 times
...
PowerLjubica
3 years, 10 months ago
It is C. The first step is to convert ISO date into text data type, and then from text to insert a new step and change to the date data type. it is important to accept inserting a new step.
upvoted 2 times
...
Mange
3 years, 11 months ago
I would say C, but in PQ
upvoted 1 times
...
claudia_learner
3 years, 11 months ago
My Excel even lets me create a working relationship between the Date[DateID] in WholeNumber format and the Invoices[DateID] in Date format - so I don't have to do any re-formatting ?!?
upvoted 2 times
...
Chikhalsouk
3 years, 11 months ago
B. Tested!
upvoted 1 times
...
daxy2020
3 years, 11 months ago
It's a very common situation when a date is input as an 8-digit number like 10032016, and you need to convert it into a date value that Excel can recognize (10/03/2016). In this case, simply changing the cell format to Date won't work - you will get ########## as the result. To convert such a number to date, you will have to use the DATE function in combination with RIGHT, LEFT and MID functions. https://www.ablebits.com/office-addins-blog/2015/03/26/excel-convert-text-date/
upvoted 1 times
...
Jrestrepo
4 years ago
I'm very surprice that "A" worked, sinced the formats of the dates were different for each table.
upvoted 1 times
...
Jrestrepo
4 years ago
I just try B and that also worked.
upvoted 1 times
...
Jrestrepo
4 years ago
As amazing as this might sound to all of you. After not being able to replicate (validate) C, which seems to be the correct answer. I tried A, and it worked as a charm. . . Go figure! ! the answer is not C, because the excel won't let you change the data type whole number to Date when the format in the DATEID field is YYYYMMDD.
upvoted 2 times
...
ThomasKwakman
4 years ago
B is correct. Here the formula would be FORMAT(Invoices[InvoiceDate];"YYYYMMDD"). You can then link both tables on two columns with the same format YYYYMMDD.
upvoted 8 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...