exam questions

Exam 70-778 All Questions

View all questions & answers for the 70-778 exam

Exam 70-778 topic 1 question 34 discussion

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

DRAG DROP -
You plan to create a report in Power BI Desktop.
You have the following tables.

You have a measure that uses the following DAX formula.
Total Sales = SUM('Sales'[SalesAmount])
You plan to create a report to display TotalSales by ProductCategory and ProductSubCategory.
You need to create a measure to calculate the percentage of TotalSales for each ProductCategory.
How should you complete the DAX formula? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
References:
https://support.office.com/en-us/article/when-to-use-calculated-columns-and-calculated-fields-ca18d63a-5b6d-4000-8ca2-14d2aadbb734

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
KipngenohVinnie
1 year ago
I have tested and that is the correct Answer
upvoted 1 times
...
CDL
4 years, 7 months ago
I will go with ALL (clear ALL filters) instead of AllSelected (retaining all other context filters or explicit filters) . https://docs.microsoft.com/en-us/dax/allselected-function-dax https://docs.microsoft.com/en-us/dax/all-function-dax
upvoted 3 times
...
cromastro
4 years, 9 months ago
I can see ALLSELECTED() being the answer had the question mentioned a slicer would be used to select categories and subcategories. But ALL() would work here as well.
upvoted 1 times
...
Dirk
5 years, 3 months ago
I think the DIVIDE function will not work for getting the percentage. DIVIDE is defined by Numerator/denominator. For getting the percentage you must switch the parameters. The filtered amount first and then the total amount. Correct?
upvoted 3 times
siqi
5 years, 3 months ago
Yes you are right, but the expression works just the same way you described. The first parameter [TotalSales] actually is filtered by row context, while the second parameter actually has cleared its filters by using the "AllSELECTED" function. So actually, the second parameter is the total amount, the order of this two parameters are correct.
upvoted 9 times
...
Satyapn9
4 years, 10 months ago
Hello, You can use the % formatting option to look as percentage; this can only be done once you work with DIVIDE (......) formula.
upvoted 1 times
...
...
kilowd
5 years, 3 months ago
DIVIDE(<numerator>, <denominator> [,<alternateresult>]) ALLSELECTED([<tableName> | <columnName>[, <columnName>[, <columnName>[,…]]]] )
upvoted 4 times
...
Aurelkb
5 years, 8 months ago
You can use ALL or ALLSELECTED it work
upvoted 2 times
JohnFan
5 years, 6 months ago
In this case, ALLSELECTED is safer as it removes all shadow filter. https://www.sqlbi.com/articles/the-definitive-guide-to-allselected http://tinylizard.com/all-vs-allselected/
upvoted 4 times
...
miro26
1 year, 9 months ago
It is not true, only ALL()!
upvoted 1 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 ...