Bird
Raised Fist0
Power BIbi_tool~10 mins

Bar and column charts in Power BI - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a basic bar chart visual in Power BI using the 'Sales' field.

Power BI
BarChart = SUMMARIZE(SalesData, SalesData[Product], "TotalSales", SUM(SalesData[[1]]))
Drag options to blanks, or click blank then click option'
AQuantity
BCustomer
CDate
DSales
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-numeric field like 'Date' or 'Customer' for summing.
2fill in blank
medium

Complete the DAX measure to calculate total sales for the column chart.

Power BI
TotalSales = CALCULATE(SUM(SalesData[[1]]))
Drag options to blanks, or click blank then click option'
AQuantity
BSales
CDiscount
DProfit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Quantity' or 'Discount' which do not represent total sales amount.
3fill in blank
hard

Fix the error in the DAX formula to correctly calculate total sales for the bar chart.

Power BI
TotalSales = SUM(SalesData[[1]])
Drag options to blanks, or click blank then click option'
ASales
BDate
CCustomer
DRegion
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to sum non-numeric columns like 'Date' or 'Customer'.
4fill in blank
hard

Fill both blanks to create a bar chart showing total sales by region.

Power BI
BarChart = SUMMARIZE(SalesData, SalesData[[1]], "TotalSales", SUM(SalesData[[2]]))
Drag options to blanks, or click blank then click option'
ARegion
BSales
CProduct
DDate
Attempts:
3 left
💡 Hint
Common Mistakes
Grouping by 'Product' or 'Date' instead of 'Region' for this chart.
5fill in blank
hard

Fill all three blanks to create a column chart measure that calculates total sales filtered by year 2023.

Power BI
TotalSales2023 = CALCULATE(SUM(SalesData[[1]]), SalesData[[2]] = [3])
Drag options to blanks, or click blank then click option'
AQuantity
BSales
CYear
D2023
Attempts:
3 left
💡 Hint
Common Mistakes
Filtering by wrong column or using a non-numeric field for sum.

Practice

(1/5)
1. Which type of chart is best to compare sales across different product categories with long names?
easy
A. Bar chart
B. Column chart
C. Pie chart
D. Line chart

Solution

  1. Step 1: Understand chart types and category names

    Bar charts display categories horizontally, which works well for long names because text fits better.
  2. Step 2: Match chart type to category length

    Column charts show vertical bars and are better for short or time-based categories, not long names.
  3. Final Answer:

    Bar chart -> Option A
  4. Quick Check:

    Long category names = Bar chart [OK]
Hint: Use bar charts for long category names [OK]
Common Mistakes:
  • Choosing column chart for long names
  • Confusing pie chart with bar chart
  • Using line chart for categorical comparison
2. Which of the following is the correct way to add a title to a bar chart in Power BI?
easy
A. Right-click the chart and type the title directly on bars
B. Select the chart, go to Format pane, and turn on Title under 'Visualizations'
C. Add a text box and place it over the chart without linking
D. Use DAX formula to create a title measure

Solution

  1. Step 1: Locate title settings in Power BI

    In Power BI, titles are added via the Format pane under the Visualizations section.
  2. Step 2: Enable and edit the title

    Turning on the Title toggle allows you to enter and customize the chart title properly.
  3. Final Answer:

    Select the chart, go to Format pane, and turn on Title under 'Visualizations' -> Option B
  4. Quick Check:

    Format pane > Title toggle = Select the chart, go to Format pane, and turn on Title under 'Visualizations' [OK]
Hint: Use Format pane to add chart titles [OK]
Common Mistakes:
  • Trying to type title directly on bars
  • Using unlinked text boxes as titles
  • Thinking DAX controls chart titles
3. Given a column chart showing monthly sales, what will happen if you add a filter to show only months with sales above 1000?
medium
A. The chart will convert to a bar chart automatically
B. The chart will show all months but highlight those above 1000
C. The chart will show no data because filters don't apply to visuals
D. The chart will display only columns for months with sales greater than 1000

Solution

  1. Step 1: Understand filter effect on visuals

    Filters in Power BI limit the data shown in visuals to only matching records.
  2. Step 2: Apply filter condition to monthly sales

    Filtering for sales > 1000 removes months with sales 1000 or less from the chart display.
  3. Final Answer:

    The chart will display only columns for months with sales greater than 1000 -> Option D
  4. Quick Check:

    Filter hides non-matching data = The chart will display only columns for months with sales greater than 1000 [OK]
Hint: Filters limit data shown in charts [OK]
Common Mistakes:
  • Thinking filters highlight but don't remove data
  • Assuming filters don't affect visuals
  • Expecting chart type to change automatically
4. You created a bar chart but the category labels overlap and are unreadable. What is the best way to fix this?
medium
A. Rotate the category labels or increase chart width
B. Increase the font size of the labels
C. Switch to a column chart to display categories vertically
D. Remove the labels completely

Solution

  1. Step 1: Identify cause of label overlap

    Long category names or many categories cause horizontal labels to overlap in bar charts.
  2. Step 2: Adjust label orientation or chart size

    Rotating labels or making the chart wider gives more space, improving readability without losing info.
  3. Final Answer:

    Rotate the category labels or increase chart width -> Option A
  4. Quick Check:

    Label rotation or width fixes overlap = Rotate the category labels or increase chart width [OK]
Hint: Rotate labels or widen chart to fix overlap [OK]
Common Mistakes:
  • Switching chart type unnecessarily
  • Increasing font size worsens overlap
  • Removing labels loses important info
5. You want to create a dashboard showing quarterly revenue trends and compare product categories side by side. Which combination of charts is best?
hard
A. Use a bar chart for quarterly revenue and a column chart for product categories
B. Use two pie charts, one for revenue and one for categories
C. Use a column chart for quarterly revenue and a bar chart for product categories
D. Use a line chart for categories and a stacked bar chart for revenue

Solution

  1. Step 1: Match chart types to data nature

    Quarterly revenue is time-based, best shown with column charts for clear trend visualization.
  2. Step 2: Choose chart for product categories

    Product categories often have longer names, so bar charts display them horizontally for readability.
  3. Step 3: Combine charts for dashboard clarity

    Using column chart for time and bar chart for categories side by side makes comparison easy and clear.
  4. Final Answer:

    Use a column chart for quarterly revenue and a bar chart for product categories -> Option C
  5. Quick Check:

    Time data = column, long names = bar [OK]
Hint: Time data = column chart; long names = bar chart [OK]
Common Mistakes:
  • Using pie charts for trend data
  • Mixing chart types incorrectly
  • Using bar chart for time series
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard