exam questions

Exam 70-778 All Questions

View all questions & answers for the 70-778 exam

Exam 70-778 topic 1 question 105 discussion

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

You plan to join a fact table named ActivityLog to a Date dimension named ActivityDate. The date value in ActivityLog is a datetime column named ActivityStart.
The date value in ActivityDate is a number column named DateID. DateID is in the YYYYMMDD format.
What should you do in the model before you create the relationship?

  • A. Change the Data Type of ActivityStart to Date.
  • B. Create a measure in ActivityLog that uses the FORMAT DAX function.
  • C. Change the Data Type of DateID to Date.
  • D. Create a calculated column in ActivityLog that uses the FORMAT DAX function.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Jrestrepo
Highly Voted 5 years, 3 months ago
The answer should be D. I you change the data type of DateID to Date, you would not be able to create a link (relationship) with "ActivityStart" column, since the Activity Start column has a datatype of Datetime.
upvoted 9 times
...
PBI
Highly Voted 5 years, 4 months ago
Why Not Option A?
upvoted 7 times
Dontpanice
5 years, 4 months ago
It has to be a calculated column since PBI needs to perform a join operation, and therefore need to have it stored in memory; opposed to a measure which only exists in memory when first executed.
upvoted 1 times
Dontpanice
5 years, 4 months ago
sorry I thought you were referring to option B.
upvoted 1 times
...
...
...
maggie4
Most Recent 4 years, 6 months ago
I tested and will vote C, as: 0.create n-1 relationship between ActivityLog[activityStart] DateTime column and ActivityDate[DateID] Number column 1.create table using "Table = NATURALINNERJOIN(ActivityDate,ActivityLog). " no row showed even there is match record. 2.change ActivityDate[DateID] type to Date 3.verify with table using "Table = NATURALINNERJOIN(ActivityDate,ActivityLog)". It successfully show the row matched. so it looks datetime and date column has no problem to match. but datetime or date column has problem to connect with number column even the format looks similar. if D is changing ActivityLog[activityStart] from Datetime to Date , still doesn't work with number column. is it logical?
upvoted 1 times
...
kyliek7
4 years, 7 months ago
In my opinion also C because format function will give you text column type which therefore should be changed to number column in order to create relationship. And column as number or even text in yyyymmdd format can be easily ready by Power BI as date in proper order after changing data type.
upvoted 1 times
...
CDL
4 years, 7 months ago
I go with C. becoz the only problem here is Dim Date table is a number column, we need to change it into "Date" so that we could use time intelligence function. I will do it in PQ editor, 1st change "number" to "text" and then to "Date", it will work, tested before while I prep for 779.
upvoted 2 times
...
Mar_tin
4 years, 7 months ago
A. Change the Data Type of ActivityStart to Date --> not needed, is already a date format B. Create a measure in ActivityLog that uses the FORMAT DAX function. --> You want to join tables and therefore you need a column not a measure C. Change the Data Type of DateID to Date ---> will produce an error in Power BI Desktop Data view as well as in Power Query D. Create a calculated column in ActivityLog that uses the FORMAT DAX function. ---> YYYYMMDD = FORMAT(DimDate[FullDateAlternateKey],"yyyymmdd") Now you can join the tables
upvoted 3 times
FrdFrd
4 years, 5 months ago
Totally agree. Error in C is "We can't automatically convert the column to Date type". I see others suggest to change the data type in Power Query or with new calculated columns using DAX. Those approaches might work but they would be different actions than C proposes.
upvoted 1 times
...
...
Fenloh
4 years, 11 months ago
Actually, one field is a datetime field and the key in the other table is yyyymmdd. Even if you would change the key to a date field, it would still lack the time information. I guess that is what raspberry wanted to say. You would still have no valid connection between the two fields. In either way, you will have to transform the Datetime field to yyyymmdd format. Therfore the only valid answer is D.
upvoted 3 times
...
J55889
4 years, 11 months ago
The Answer is D: A: If you change date type to date, you will lost time information. (Never do that in the real life). C: Don't use date as a primary key type for any table.
upvoted 1 times
...
PowerLjubica
5 years ago
It is C. When you want to transform ISO date (yyyymmdd) into a date, you have to add two steps: first to change date column into text, and then to change it from a text to a date while adding a new step. If it only replace the previous step, it will give an error, so in some versions of Excel you have to type M Code for this second step.
upvoted 2 times
...
RutRut
5 years, 4 months ago
C and D works. More reasonable is to keep Date Type in both columns for time intelligence purposes. I go with C.
upvoted 5 times
...
Ricky7876
5 years, 4 months ago
I'm going with C
upvoted 1 times
...
raspberry
5 years, 4 months ago
D. That will be this formula: FORMAT( ActivityLog[ActivityStart], "yyyymmdd" ). PowerQuery (M) , this is C, returns error when you try to change value number yyyymmdd to date.
upvoted 1 times
...
Brunobsv
5 years, 8 months ago
Can someone explain why D is the right one ?
upvoted 1 times
CorinnaK
5 years, 8 months ago
The date value in Activity log is in datetime. With the FORMAT DAX function you can transform it to the format "YYYYMMDD" in a new column. Than it is in the same format like DATE ID and you can create the relationship
upvoted 13 times
AnetaK
5 years, 7 months ago
But time intelligence won't work when there is a relation on non-date columns.
upvoted 3 times
cs3122
5 years, 5 months ago
that doesn't matter ,because the relationship will exist. You won't use time intelligence on the non-date column, but rather the correctly formatted date column. The heart of this question relates to how to build a relationship.
upvoted 2 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 ...