How can I build a Power BI matrix to compare Plan and Fact values side-by-side even if some values are missing

0 votes

How can I build a Power BI matrix to compare Plan and Fact values side-by-side even if some values are missing?
I’m trying to build a matrix in Power BI that compares Plan and Fact values side-by-side, but some values are missing in the dataset. I need to know how to set up the matrix so that it displays both Plan and Fact values, even if some are missing, without breaking the comparison.

6 hours ago in Power BI by Evanjalin
• 33,850 points
5 views

1 answer to this question.

0 votes

To build a Power BI matrix that compares Plan and Fact values side-by-side, even when some values are missing in the dataset, you can follow these steps:

1. Ensure Proper Data Structure

  • You should have two columns or tables representing Plan and Fact data. If they are in separate tables, make sure they are properly related, typically through a shared key (like a Date or Product ID).

  • If Plan and Fact data are in the same table but in separate columns, you can directly work with them in the matrix.

2. Handle Missing Values with DAX

  • If some values are missing in either the Plan or Fact columns, you can use DAX to replace those missing values with 0 (or another default value) to ensure they appear in the matrix without breaking the comparison.

Example:

Plan Value = COALESCE(SUM('Plan'[Value]), 0)
Fact Value = COALESCE(SUM('Fact'[Value]), 0)
  • This will ensure that if there are missing values for either Plan or Fact, the matrix will show 0 (or another default value) instead of leaving an empty cell.

3. Create the Matrix Visual

  • Drag a Matrix visual onto your report canvas.

  • Place the rows (e.g., Time Period, Product, or Category) in the Rows field well.

  • Place the Plan Value and Fact Value measures (created using DAX) in the Values field well.

4. Use “Show Items with No Data” Option

  • In the case where rows exist in the dataset (e.g., time periods or products) but the corresponding Plan or Fact value is missing, you need to ensure the missing data rows are still shown in the matrix.

  • To do this:

    1. Right-click on the Rows field (e.g., Date or Product) in the Fields pane.

    2. Choose Show Items with No Data. This will ensure that all rows are displayed, even if there is no corresponding data in either the Plan or Fact columns.

5. Customizing for Readability

  • Conditional Formatting: You can apply conditional formatting to make it clear which cells contain Plan values, Fact values, or missing values. This can help highlight discrepancies or missing data.

  • Column Headers: Rename the columns in the matrix to clearly distinguish Plan from Fact, for example, “Plan Value” and “Actual Value”.

  • Sorting: Sort the matrix by a relevant dimension (e.g., Time) to make the comparison clearer.

6. Handle Missing Data for Comparison

  • If you have missing values for both Plan and Fact for certain rows, consider showing the comparison as null/empty or using a DAX expression like IF(ISBLANK()) to highlight missing data, such as:

Plan vs Fact = 
IF(ISBLANK([Plan Value]) || ISBLANK([Fact Value]), "Data Missing", [Plan Value] - [Fact Value])

This will label the row as "Data Missing" where either Plan or Fact data is unavailable.

answered 6 hours ago by anonymous
• 33,850 points

Related Questions In Power BI

0 votes
2 answers

How can I use Power BI Fabric to build interactive data narratives and insights for business stakeholders?

Use Power BI Fabric to unify data ...READ MORE

answered Apr 8 in Power BI by anonymous
• 24,450 points
289 views
+1 vote
2 answers

Are there any challenges or limitations when using Power BI Fabric to build data narratives, and how can they be overcome?

Three essential roles will be essential in ...READ MORE

answered Dec 27, 2024 in Power BI by pooja
• 24,450 points

edited Mar 6 309 views
+1 vote
2 answers
0 votes
1 answer

I have a web API with basic authorisation and username and password. How do i connect to it in Power BI?

Hey, @There, I found your query is quite ...READ MORE

answered Oct 29, 2020 in Power BI by Gitika
• 65,730 points
4,251 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,090 points
1,780 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,090 points
3,146 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,944 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 2,142 views
+1 vote
1 answer

Why am I unable to set refresh for a web-based anonymous connection in Power BI Server, and how can I resolve it?

Scheduled refresh for web-based data sources that ...READ MORE

answered Feb 28 in Power BI by anonymous
• 33,850 points
293 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP