Exam DP-600 All QuestionsBrowse all questions from this exam
Question 17

You have a Fabric tenant that contains a Microsoft Power BI report named Report1. Report1 includes a Python visual.

Data displayed by the visual is grouped automatically and duplicate rows are NOT displayed.

You need all rows to appear in the visual.

What should you do?

    Correct Answer: C

    To ensure all rows appear in the Python visual in your Power BI report, you need to add a unique field to each row. By adding a unique identifier, such as an index field, to your dataset, you make each row distinct. This prevents Power BI from automatically grouping the data and eliminates any issues with duplicate rows being excluded from the visual. This approach ensures that all rows, including duplicates, are considered unique and displayed in the visual.

Discussion
TashaPOption: A

A - often the Microsoft learn pages give you the exact answer: Under tips on the link I posted: In some cases, you might not want automatic grouping to occur, or you might want all rows to appear, including duplicates. In those cases, you can add an index field to your dataset that causes all rows to be considered unique and prevents grouping. https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals There are always multiple approaches in application but if you do the MS exam give the MS answer.

thuss

It even says "The default aggregation is Don't summarize" already. Helpful link, definitely correct answer.

cgroven

Adding an index field to your dataset means that you add a column/field that's unique to each row, meaning that the correct answer is C, not A. "Reference columns by index" means writing df.iloc[indexNo] instead of df["fieldName"], and that doesn't help anything.

SKN08

sorry but that (A) sounds incorrect. This is from the MS documentation: "In those cases, you can add an index field to your dataset that causes all rows to be considered unique and prevents grouping." and it means create new column that has a unique value for each and every row of the dataset. *C* is correct

FermdOption: D

The right answer is D: By setting the "Summarize By" property to "None" for all columns, you disable automatic aggregation and ensure all rows, including duplicates, are displayed in the Python visual.

cgrovenOption: C

I think people are misunderstanding what option A is saying. The option says to reference columns INSIDE the Python code by index, which does not help. That means writing df.iloc[:, columnIndex] instead of df[columnName], see Pandas documentation for more on this: https://pandas.pydata.org/docs/user_guide/indexing.html The Microsoft learn article that's referenced several times in these comments clearly says that you need to add a column that's unique to all rows which "causes all rows to be considered unique and prevents grouping" -- this is what option C means.

dp600

I think it refers to add the index to the "Values" section. It had helped me before while I wanted to show for each day multiple points in a graph. I think its A.

stilferxOption: C

IMHO, the answer is C - add unique value (index). It can be found here: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals It says: In some cases, you might not want automatic grouping to occur, or you might want all rows to appear, including duplicates. In those cases, you can add an index field to your dataset that causes all rows to be considered unique and prevents grouping.

Azure_2023Option: C

C. Add a unique field to each row. By adding a unique field to each row, you ensure that Power BI treats each row as distinct. This can be achieved by incorporating a column that contains unique values for each row (e.g., a row number or a unique identifier). When this unique field is included in the dataset used by the Python visual, Power BI will not aggregate the rows because it recognizes each one as different due to the unique identifier.

Plb2Option: A

as clearly stated here https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals

ZStewardOption: C

The default aggregation is Don't summarize. so no need for etting the "Summarize By" property to "None" for all columns , C is correct Answer

rmengOption: C

C (“Add a unique field to each row”) is the correct approach. By adding an index column, you’ll ensure that all rows appear in your Python visual.

SilvanoRamalhoOption: A

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals --- Respostas "A"... da MS... Em alguns casos, talvez você não queira que o agrupamento automático ocorra ou queira que todas as linhas apareçam, inclusive as duplicadas. Nesses casos, você pode adicionar um campo de índice ao seu conjunto de dados que faz com que todas as linhas sejam consideradas exclusivas e evita o agrupamento.

ziggy1117Option: C

ANSWER IS C: In some cases, you might not want automatic grouping to occur, or you might want all rows to appear, including duplicates. In those cases, you can add an index field to your dataset that causes all rows to be considered unique and prevents grouping. This means you need to add an index field column in which case each row will have a unique index value per row

SilvanoRamalhoOption: C

C- ADIONAR UMA COLUA INDICE

mabiancoOption: D

IMO key words in question are "...the visual is grouped automatically..." so reason while duplicate are NOT displayed is the visual, to revert simply change visual property

sabribrkOption: D

D. Modify the Summarize By property for all columns

woliveirasOption: A

Index column always guys...

bda92b3

Because index is never repeated right !

282b85dOption: D

To ensure all rows appear in the Python visual in your Power BI report, you need to modify how the data is being summarized. Power BI often automatically groups data and displays unique rows based on the "Summarize By" property of the columns. If this property is set to summarize (like sum, average, etc.), it will group the data, and you may not see duplicate rows. To display all rows, including duplicates, you should: D. Modify the Summarize By property for all columns

rlo123Option: D

D is the most correct answer, A could be used but not as direct as D is. In Power BI, the default behavior for visuals (including Python visuals) is to aggregate data. This means it groups by unique values and may omit duplicate rows. By changing the "Summarize By" property to "Don't Summarize" for the relevant columns, you instruct Power BI to send the raw, unaggregated data to the Python visual. Why other options are less ideal: A. Reference the columns in the Python code by index: This could be a workaround, but it doesn't address the root cause of the issue (automatic aggregation) and makes your Python code potentially less readable. B. Modify the Sort Column By property for all columns: Sorting doesn't prevent aggregation and wouldn't influence the number of rows displayed. C. Add a unique field to each row: This is a valid solution but adds overhead to your data preparation. Changing the "Summarize By" property is likely a cleaner approach.

manoletOption: C

C regarding to the links provided in previous comments