You have a table with sales data and a column 'MonthName' containing month names as text (e.g., January, February). You want to create a measure that returns total sales sorted by calendar month order, not alphabetically.
Which DAX expression correctly creates a calculated column to sort 'MonthName' in calendar order?
Think about assigning a number to each month name to represent its calendar order.
Option D uses SWITCH to assign each month name a number from 1 to 12, which can be used to sort months in calendar order. Option D tries to convert text to date but may fail if the locale or format is not recognized. Option D only covers three months and is incomplete. Option D ranks alphabetically, not calendar order.
You created a bar chart showing total sales by product category. By default, the categories are sorted alphabetically. How do you sort the bars from highest to lowest total sales?
Choose the correct step to achieve this in Power BI.
Look for sorting options directly on the visual's axis or fields.
Option A is correct because Power BI allows sorting visuals by any measure by clicking the axis and choosing 'Sort by' with direction. Option A is incorrect because changing data type does not affect sorting by measure. Option A is more complex than needed. Option A is unnecessary if sorting can be done inside Power BI.
You have a 'Product' table with a 'Category' column (text) and a 'CategorySortOrder' column (number). You want the 'Category' column to be sorted by 'CategorySortOrder' in all visuals.
What is the correct way to set this up in Power BI?
Power BI allows sorting one column by another column in the data model.
Option C is correct because Power BI has a 'Sort by Column' feature to sort text columns by numeric columns. Option C is invalid because measures cannot be used to sort columns. Option C would lose original data. Option C ignores the requirement.
You created a calculated column 'WeekdaySort' to sort weekday names in calendar order, but the sorting is incorrect in your report.
Here is the DAX code you wrote:
WeekdaySort = SWITCH([WeekdayName], "Monday", 1, "Tuesday", 2, "Wednesday", 3, "Thursday", 4, "Friday", 5, "Saturday", 6)
Why is the sorting wrong?
Check if all possible weekday names are covered in the SWITCH statement.
Option B is correct because Sunday is missing from the SWITCH cases, so it returns BLANK(), which sorts before 1. This causes Sunday to appear first instead of last. Option B is wrong because syntax is correct. Option B is false; text can be sorted by numeric columns. Option B is incorrect; SWITCH is appropriate here.
In Power BI, you want to sort a table visual by two columns: first by 'Region' alphabetically, then by 'Sales' descending within each region.
Which statement best describes how to achieve this sorting?
Try using Ctrl key to add multiple sort levels in the visual.
Option A is correct because Power BI allows multi-column sorting in visuals by sorting one column, then holding Ctrl and sorting another. Option A is complex and unnecessary. Option A is false; multi-column sorting is supported. Option A is not required.