exam questions

Exam PL-300 All Questions

View all questions & answers for the PL-300 exam

Exam PL-300 topic 2 question 76 discussion

Actual exam question from Microsoft's PL-300
Question #: 76
Topic #: 2
[All PL-300 Questions]

HOTSPOT
-

You are creating a Power BI model to analyze inventory.

You load data into three tables named Date, Product, and Inventory. The Inventory table relates to the Date and Product tables by using one-to-many relationships.

Inventory data is recorded daily with no exceptions. The correct inventory quantity for a given product in a month is the last recorded value for that month.

You need to write a DAX measure that will show the correct inventory value when a user analyzes inventory by year, month, or date.

How should you complete the measure? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

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
pverde
Highly Voted 1 year, 8 months ago
I believe the answer is correct
upvoted 27 times
...
andrewkravchuk97
Highly Voted 1 year, 8 months ago
Calculate LastNonBlankValue LASTDATE will NOT work. Date - is a date table and it contains all days of the calendar month continuously so it will always return the last day of the month even if there is no inventory records. "The correct inventory quantity for a given product in a month is the last recorded value for that month.". That's why we should use LastNonBlankValue instead.
upvoted 12 times
EwoutBI
1 year, 8 months ago
LASTNONBLANKVALUE also requires an expression though. https://learn.microsoft.com/nl-nl/dax/lastnonblankvalue-function-dax
upvoted 7 times
0e18c76
11 months, 3 weeks ago
The right answer should be LastDate. It can't be LASTNONBLANK as it is requires an expresion. Please find below the sintax for LASTNONBLANK: - LASTNONBLANK(<column>,<expression>) This function is typically used to return the last value of a column for which the expression is not blank. For example, you could get the last value for which there were sales of a product (for instance if you want to exclude holidays from the calculation).
upvoted 4 times
...
...
blmthmn
1 year, 8 months ago
It also says 'Inventory data is recorded daily with no exceptions.' so I concluded that each day would have an inventory record.
upvoted 10 times
...
...
rcaliandro
Most Recent 8 months, 1 week ago
Correct answer
upvoted 1 times
...
SRL_Student
1 year ago
Hello, can someone explain to me why Max won't do (if that's the case, as it seems)? Thank you in advance!
upvoted 2 times
...
Aero_1898
1 year, 1 month ago
LASTNONBLANKVALUE this will not working as it requires 2 parameters.
upvoted 2 times
...
applushka
1 year, 3 months ago
how do you guys use Date[Date] as the expression in the LASTNONBLANK function like in the example from earlier answers "LASTNONBLANK('Inventory'[QuantityAvailable], 'Date'[Date])"?
upvoted 1 times
applushka
1 year, 3 months ago
I was able to do it this way: CALCULATE(SUM(Inventory[QuantityAvailable]),LASTDATE('Inventory'[Date]) ) my sample dataset dates (Jan-Apr 2023) and Date table (Jan-Dec 2023) dates probably not tuned properly so if I use Date[Date] instead of Inventory[Date] my measure returns Blank
upvoted 2 times
...
...
Igetmyrole
1 year, 7 months ago
Calculate LastDate Last Inventory Count = CALCULATE( LASTNONBLANK('Inventory'[QuantityAvailable], 'Date'[Date]), LASTDATE('Date'[Date]) )
upvoted 1 times
...
a22775
1 year, 7 months ago
CALCULATE LASTDATE It isn't MAX because that would returns an scalar instead of a table. https://www.sqlbi.com/blog/marco/2013/10/22/difference-between-lastdate-and-max-for-semi-additive-measures-in-dax/
upvoted 7 times
powerbi_learner
1 year, 1 month ago
how you are saying it is returning table? how did you find that?
upvoted 1 times
...
...
rgabage
1 year, 8 months ago
The answer is correct
upvoted 6 times
...
kelvin3105
1 year, 8 months ago
I think this questions is not well explained. Let me say why ( from brazil, sorry if I write wrong): 1. That is form to create a calendar table based in the dates of the fact table, for example: if I create based on the fact table, the last date will be the last date of the fact table. 2. Other way of create a calendar table is just to put the days of a number of years that you want, so, in this case the last date will be the last date of the calendar table and not the last date of the fact table. So, in my opinion it is better annul this question, or consider lastnonblankvalue and lastdate correct.
upvoted 5 times
539d541
8 months ago
yep question is confusing indeed
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago