PL-300 Exam QuestionsBrowse all questions from this exam

PL-300 Exam - Question 141


HOTSPOT -

You have a Power BI semantic model that contains a table named Item. The Item table contains a column named Quantity.

You need to create a DAX query that meets the following requirements:

• The rank of items must be calculated according to the values in Quantity.

• Ranking must NOT be skipped if two or more items have the same value in Quantity.

• If an item is unfiltered, the total of Quantity must display a blank value.

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

NOTE: Each correct selection is worth one point.

Exam PL-300 Question 141
Show Answer
Correct Answer:
Exam PL-300 Question 141

Discussion

6 comments
Sign in to comment
[Removed]
Sep 28, 2024

HASONEVALUE ('Item'[Item]) check if 'item' is filtered to a single value. if not, it returns blank by default. Rank method : DENSE ensure that ranks are not skipped when there are ties.

sroumi
Apr 17, 2025

SELECTEDVALUE returns the actual value of the column if there is exactly one unique value, or it returns an alternate result (or BLANK) if there isn’t—its focus is on extracting a value, not simply checking whether there is exactly one. HASONEVALUE is designed purely as a Boolean check. It returns TRUE if there is exactly one distinct value and FALSE otherwise, which is precisely what you need for controlling the logic (calculate rank for a single item, BLANK for totals).

nelrosell
Sep 6, 2024

Correct Answer: HASONEVALUE, DENSE

hatem.ayed
Sep 12, 2024

HASONEVALUE garantiza que la fórmula se ejecute únicamente cuando haya un solo valor de Item seleccionado. Esto evita que se devuelva un valor de clasificación cuando no se ha seleccionado ningún elemento, cumpliendo con el requisito de mostrar un valor en blanco si no se ha filtrado ningún elemento. DENSE se asegura de que, si dos o más elementos tienen la misma cantidad, no se omitan números en la clasificación, lo cual era otro de los requisitos.

nammm112
Sep 5, 2024

Wrong. It should be HASONEVALUE and DENSE

jaume
Nov 20, 2024

RANKX(<table>, <expression>[, <value>[, <order>[, <ties>]]]) <expression> to evaluate for ranking (within the <table>) <value> is optional; if omitted, current row's value in <expression> is used <order> (optional) to set sort order (ASC, DESC) <ties> is also optional and determines how ties are handled SKIP: skips rank for ties (e.g ranks 1,2,2,4) DENSE does not skip ranks for ties (e.g. ranks 1,2,2,3)

0f4908c
Feb 5, 2025

Selected Value Example = SELECTEDVALUE(Products[ProductName], BLANK()) ? HASONEVALUE need IF