.jpg?alt=media&token=b39ccd5e-4909-4d21-b5d8-c2e8fecd8659)
Top 22 'How to' Questions Frequently Asked in Power BI
- How To Add A Column With Same Value In Power BI
- How To Add Parameters In Power BI Dashboard
- How To Add Hyperlink In Power BI
- How To Add A Measure Table In Power BI
- How To Fix Data Source Error In Power BI
- How To Replace 0 With Blank In Power BI
- How To Calculate Variance In Power BI
- How To View Full Screen In Power BI Desktop
- How To Add Custom Font In Power BI Desktop
- How To Export Power BI Into Excel
- How To Show Month Over Month Change In Power BI
- How To Group Slicers In Power BI
- How To Connect To Data Source In Power BI
- How To Calculate Running Total In Power BI DAX
- How To Add Current Date In Power BI
- How To Rename A Table In Power BI
- How To Select Two Columns In Power BI
- How To Add A Search Box To A Slicer In Power BI
- How To Create A Pie Chart In Power BI
- How To Change Data Connectivity Mode In Power BI
- How To Delete Rows In Power BI
- How To Calculate Attrition Rate In Power BI
1/ How To Add A Column With Same Value In Power BI
To add a column with the same value in Power BI, follow these steps:
- Open Power BI Desktop and load your dataset.
- Go to the "Modeling" tab or switch to the "Data" view.
- Select the table where you want to add the column.
- Click "New Column" in the ribbon.
- In the formula bar, enter a DAX expression like this:
- (Replace "NewColumnName" with your desired column name and "SameValue" with the constant value you want, e.g., "Yes", 100, or "2025".)
- Press Enter to create the column. The same value will appear in every row of the new column.
Alternatively, you can use Power Query:
- Go to "Home" > "Transform Data" to open Power Query Editor.
- Select the table.
- Click "Add Column" > "Custom Column".
- In the formula box, enter a value (e.g., "SameValue") and name the column.
- Click OK, then "Close & Apply" to save.
This method works for any dataset size and updates dynamically with your data model.
2/ How To Add Parameters In Power BI Dashboard
Adding parameters to Power BI dashboards allows users to dynamically adjust visuals, filters, or data sources interactively. Parameters can be "What-If" parameters for scenarios (e.g., sliders for values), field parameters for switching measures/dimensions, or query parameters for data connections. This guide covers the main methods, focusing on Power BI Desktop (as of October 2025). You'll need Power BI Desktop (free) and a dataset ready.Method 1: What-If Parameters (For Scenario Analysis in Dashboards)What-If parameters create sliders or dropdowns for testing variables like discount rates or thresholds. They're ideal for interactive dashboards.
- Open Power BI Desktop and load your dataset (e.g., sales data).
- Go to the Modeling Tab: Select New Parameter > Number (or Text/List for other types).
- Configure the Parameter:
- Name: e.g., "Discount Rate".
- Data Type: Decimal Number.
- Default Value: 0.10 (10%).
- Minimum/Maximum: 0 to 0.50.
- Increment: 0.05.
- Add Slicer to This Page: Check to auto-add a slicer.
- Create a Measure Using the Parameter:
- In the formula bar, create a measure like:
- Adjusted Sales = SUM(Sales[Revenue]) * (1 - [Discount Rate])
- Add to Visuals: Drag the measure to a card or chart on your dashboard page.
- Test: Use the slicer to adjust the parameter—visuals update live.
This adds interactivity to dashboards without coding. Time: 5-10 minutes.
learn.microsoft.com +1
Method 2: Field Parameters (For Dynamic Field Switching)Field parameters let users swap measures or dimensions in visuals via a dropdown, reducing slicer clutter.
- In Power BI Desktop, go to the Modeling Tab > New Parameter > Fields.
- Select Fields: Choose 2+ fields (e.g., Sales Amount, Profit Margin for measures; or Region, Category for dimensions). 3 - Name the Parameter: e.g., "Metric Selector".
- Add to Visual: Drag the parameter to a chart's Values or Axis field—it creates a dropdown slicer.
- Show Selected Field: In the visual's Values well, click the dropdown next to the parameter > Show Selected Field to display the current selection.
- Publish and Test: Users can switch fields dynamically in the dashboard.
Note: Edit via DAX if needed (e.g., add fields with Shift+Enter). Works with DirectQuery but requires explicit measures.
learn.microsoft.com +1
Method 3: Query Parameters (For Data Source Flexibility)Query parameters filter data at import or connect dynamically (e.g., server name).
- Open Power Query Editor: Home > Transform Data.
- Create Parameter: Manage Parameters > New Parameter.
- Name: e.g., "ServerName".
- Type: Text.
- Default: Your SQL server (e.g., "localhost").
- Reference in Query: In Advanced Editor, use the parameter, e.g., Sql.Database([ServerName], "Database").
- Apply: Close & Apply—parameter appears in Queries pane.
- Dashboard Integration: Use in visuals; change values in Power BI Service settings.
3/ How To Add Hyperlink In Power BI
Adding a hyperlink in Power BI allows you to create interactive reports by linking to external websites, files, or other dashboards. This feature enhances user navigation and is supported in Power BI Desktop and Service as of October 2025. Below are the main methods to add hyperlinks, tailored for practical use as of 02:31 PM +07 on Thursday, October 9, 2025.Method 1: Add Hyperlink Using a Table or Matrix VisualThis method embeds clickable URLs directly in a table or matrix.
- Prepare Your Data:
- Ensure your dataset includes a column with URLs (e.g., "https://flexaintel.com").
- Load the data into Power BI Desktop via Home > Get Data > Excel.
- Create a Table Visual:
- Go to the Report View, select the Table or Matrix visual from the Visualizations pane, and drag it to the canvas.
- Add the URL column (e.g., "Website") to the Values field.
- Enable Hyperlink:
- Select the table visual, go to the Format Visual pane.
- Under Values > URL icon, toggle "Web URL" to On.
- Set the column with URLs (e.g., "Website") as the source by selecting it from the dropdown.
- Test:
- Click the URL in the table—it should open in a new browser tab.
- Time: ~5 minutes for a 500-row dataset.
Method 2: Add Hyperlink Using a ButtonButtons provide a more controlled navigation experience, linking to specific destinations.
- Insert a Button:
- In Report View, go to Insert > Buttons > Blank.
- Place the button on the canvas and resize as needed.
- Configure the Action:
- Select the button, go to the Format pane > Action.
- Toggle "Action" to On, set Type to "Web URL".
- Enter the URL (e.g., "https://flexaintel.com") in the Web URL field.
- Customize:
- Add text (e.g., "Visit Website") via the General > Text settings.
- Adjust colors or icons for visibility.
- Test:
- Click the button in View mode to verify the link opens.
- Time: ~3-5 minutes.
Method 3: Add Hyperlink Using DAX and a Custom ColumnFor dynamic URLs based on data, use DAX to create a clickable column.
- Add a Custom Column:
- In Data View, select your table, go to Table Tools > New Column.
- Use a DAX formula like:
- (Concatenates a base URL with a unique identifier.)
- Create a Table Visual:
- Drag the new column to a table visual.
- Enable Hyperlink:
- As in Method 1, format the visual to recognize the column as a Web URL.
- Test:
- Click the generated link to ensure it directs correctly.
- Time: ~10 minutes, depending on data complexity.
4/ How To Add A Measure Table In Power BI
Adding a measure table in Power BI allows you to organize and manage measures (calculations) separately from your data tables, improving report clarity and maintainability. This is especially useful for complex dashboards with multiple metrics. As of 02:33 PM +07 on Thursday, October 9, 2025, Power BI Desktop supports this feature natively. Below are the steps to create a measure table, tailored for practical use.Steps to Add a Measure Table in Power BI
- Open Power BI Desktop:
- Launch Power BI Desktop and load your dataset (e.g., via Home > Get Data > Excel > Load).
- Switch to Data View:
- Go to the "View" tab and select "Data View" or click the Data icon in the left pane.
- Create a New Table:
- In the "Modeling" tab, click New Table.
- In the formula bar, enter a DAX expression to define an empty table. For example:
- This creates a blank table named "MeasureTable" with a single column "MeasureName" (you can adjust the name or remove the column later).
- Add Measures to the Table:
- Select the new "MeasureTable" in the Fields pane.
- Create measures by clicking New Measure in the "Modeling" tab or right-clicking the table and selecting "New Measure".
- Example measures:
- TotalSales = SUM(Sales[Revenue])
- AvgProfit = AVERAGE(Sales[Profit])
- Enter each measure in the formula bar and press Enter.
- Organize the Table:
- The measures will appear under "MeasureTable" in the Fields pane.
- Optionally, hide the "MeasureName" column (right-click > Hide) if it’s not needed, as the table’s purpose is to hold measures.
- Use in Visuals:
- Switch to "Report View", drag the measure table to the canvas, and use its measures in charts, cards, or tables.
- Example: Add "TotalSales" to a card visual to display the sum.
- Save and Publish:
- Save your file (File > Save) and publish to Power BI Service (Home > Publish) if needed.
- Time: ~5-10 minutes for a small dataset.
5/ How To Fix Data Source Error In Power BI
Data source errors in Power BI can occur due to connectivity issues, credential problems, or data changes, preventing reports from refreshing or loading. As of 02:34 PM +07 on Thursday, October 9, 2025, this guide provides practical steps to troubleshoot and resolve these errors in Power BI Desktop and Service, leveraging the latest updates and community insights.Steps to Fix Data Source Errors in Power BI
- Identify the Error Message:
- Check the error details in Power BI Desktop (under "Error" in Data View) or Power BI Service (in the dataset settings).
- Common messages include "Credentials are required," "Data source not found," or "Timeout."
- Verify Data Source Connection:
- In Power BI Desktop, go to Home > Transform Data > Data Source Settings.
- Ensure the source file (e.g., Excel, SQL) or server (e.g., "localhost") is accessible.
- For cloud sources (e.g., SharePoint), confirm the URL is correct.
- Update or Re-enter Credentials:
- Go to File > Options and Settings > Data Source Settings.
- Select the data source, click "Edit Permissions," and re-enter credentials (e.g., username/password or OAuth token).
- In Power BI Service, go to Settings > Datasets > Data Source Credentials > Edit and re-authenticate.
- Time: ~2-5 minutes.
- Check Gateway Configuration (On-Premises Data):
- If using an on-premises data source, ensure the On-Premises Data Gateway is installed and running.
- Open the Gateway app, verify the status is "Online," and match the data source name.
- In Power BI Service, go to Settings > Manage Gateways > Add Data Source if needed.
- Refresh the Dataset:
- In Desktop, click Home > Refresh or right-click the table in Data View > Refresh.
- In Service, go to Datasets > ellipsis (...) > Refresh Now.
- Monitor the refresh status for errors.
- Validate Data Structure:
- Open Power Query Editor (Home > Transform Data) and check for removed columns, renamed tables, or changed data types.
- Fix issues (e.g., remove broken steps) and click Close & Apply.
- Test with a New Connection:
- If persistent, re-import the data: Home > Get Data > Reconnect to the source.
- Create a new query to bypass corrupted settings.
6/ How To Replace 0 With Blank In Power BI
Replacing 0 with a blank (null) in Power BI enhances report readability by removing unnecessary zeros from visuals, calculations, or tables. This can be done using Power Query, DAX, or visual formatting, depending on your needs. As of 02:34 PM +07 on Thursday, October 9, 2025, this guide provides practical methods using Power BI Desktop, incorporating the latest updates.Method 1: Replace 0 with Blank Using Power QueryThis method modifies the data at the source level, ideal for cleaning datasets.
- Open Power Query Editor:
- In Power BI Desktop, go to Home > Transform Data.
- Select the Column:
- Choose the column with zeros (e.g., "SalesAmount").
- Replace Values:
- Right-click the column header > Replace Values.
- In "Value to Find," enter 0.
- In "Replace With," leave it blank or enter null.
- Click OK.
- Apply Changes:
- Click Close & Apply to load the updated data.
- Time: ~3-5 minutes for a 1,000-row dataset.
Method 2: Replace 0 with Blank Using DAXUse DAX to create a calculated column or measure that replaces 0 with blank dynamically.
- Create a Calculated Column:
- In Data View, select the table, go to Table Tools > New Column.
- Enter a formula like:
- This sets 0 to blank and keeps other values.
- Create a Measure (Optional):
- For aggregations, use:
- This excludes 0s from the sum.
- Use in Visuals:
- Drag the new column or measure to a table or chart.
- Time: ~5 minutes.
Method 3: Replace 0 with Blank Using Visual FormattingThis method hides zeros in visuals without altering the data.
- Select the Visual:
- In Report View, click the table, matrix, or card visual.
- Format the Visual:
- Go to the Format Visual pane.
- Under Values > Display Units, set to "None."
- Under Field Formatting (for the specific column), toggle "Show zero" to Off.
- Apply:
- Zeros disappear from the visual but remain in the data model.
- Time: ~2-3 minutes.
7/ How To Calculate Variance In Power BI
Calculating variance in Power BI allows you to measure the difference between two values (e.g., actual vs. budget, current vs. previous period), enabling insightful comparisons in reports. As of 02:35 PM +07 on Thursday, October 9, 2025, this guide covers methods using DAX to compute variance, with options to visualize it effectively, including integration with Flexa Tables for enhanced analysis.Method 1: Calculate Variance Using DAX (Basic Difference)This method calculates the simple difference between two measures or columns.
- Prepare Your Data:
- Ensure your dataset has two relevant columns or measures (e.g., "ActualSales" and "BudgetSales").
- Load the data into Power BI Desktop via Home > Get Data > Excel.
- Create a Measure:
- In Data View, select the table, go to Table Tools > New Measure.
- Enter a DAX formula like:
- Replace "Table" with your table name and adjust column names.
- Use in Visuals:
- Drag the "SalesVariance" measure to a card, table, or chart in Report View.
- Time: ~5 minutes.
Method 2: Calculate Variance Percentage Using DAXThis method computes the variance as a percentage, useful for relative analysis.
- Create the Measure:
- In the same table, add a new measure:
- This calculates (Actual - Budget) / Budget * 100, with 0 as a fallback to avoid division errors.
- Format the Measure:
- Go to Modeling > Format > Percentage, set decimals to 2.
- Add to Visuals:
- Use in a card or table to show the percentage variance.
- Time: ~7 minutes.
Method 3: Calculate Variance with Time Intelligence (e.g., Month-over-Month)For time-based variance (e.g., current month vs. previous month), use DAX time intelligence.
- Create Measures:
- First measure for current period:
- Previous period:
- Variance:
8/ How To View Full Screen In Power BI Desktop
Viewing your report in full screen in Power BI Desktop allows you to focus on the dashboard layout, analyze details, or present to an audience without distractions. As of 02:36 PM +07 on Thursday, October 9, 2025, this feature is built into Power BI Desktop, and this guide provides simple steps to achieve it.Steps to View Full Screen in Power BI Desktop
- Open Your Report:
- Launch Power BI Desktop and open the report you want to view (File > Open or start a new report).
- Switch to Report View:
- Ensure you’re in the "Report" view by clicking the "Report" icon in the left pane (looks like a page with a graph).
- Enter Full Screen Mode:
- Click the View tab in the ribbon at the top.
- Select Full Screen from the options (or press F5 as a shortcut).
- The report will expand to fill your entire screen, hiding the ribbon, panes, and other UI elements.
- Navigate Pages:
- Use the page navigation arrows (if multiple pages exist) or the page selector at the bottom to move between report pages.
- Full screen mode retains interactivity (e.g., slicers, filters).
- Exit Full Screen:
- Press Esc or F5 again, or move your mouse to the top of the screen to reveal the exit option and click it.
- Time: ~1-2 minutes.
Alternative Method: Maximize the WindowIf full screen mode isn’t needed but you want a larger view:
- Click the Maximize button (square icon) in the top-right corner of the Power BI Desktop window.
- This enlarges the app window but keeps the ribbon and panes visible.
9/ How To Add Custom Font In Power BI Desktop
Adding Custom Fonts via JSON Theme File
- Install the Font on Your System:
- Download a custom font (e.g., Poppins from Google Fonts).
- Right-click the .ttf file > Install for all users (requires admin rights).
- Restart Power BI Desktop to recognize the font.
- Time: ~2 minutes.
- Create or Open a Report:
- Launch Power BI Desktop and open/create a report.
- Add a sample visual (e.g., a text box or card) to test.
- Export the Default Theme:
- Select a visual (e.g., the text box).
- Go to the Format pane > General > Effects > Theme > Export current theme.
- Save the JSON file (e.g., "CustomTheme.json").
- Time: ~1 minute.
- Edit the JSON Theme File:
- Open the JSON file in a text editor (e.g., Notepad++ or VS Code).
- Locate the "name" section under "*":
- Replace "Segoe UI" with your custom font name (e.g., "Poppins"). For specific elements:
- Save the file. Ensure exact font name matches (case-sensitive; check in Word/Excel).
- Time: ~5-10 minutes (longer for multiple elements).
- Import the Custom Theme:
- In Power BI Desktop, go to the View tab > Themes > Browse for themes.
- Select your edited "CustomTheme.json" and apply.
- The font should update in visuals (e.g., titles, axes, labels).
- Test and Apply:
- Refresh the report (Home > Refresh).
- Check visuals: Select one, go to Format > Text > Font family—your custom font should appear in the dropdown.
- For consistency, apply to all visuals individually if needed.
- Time: ~3 minutes.
- Publish and Verify in Service:
- Home > Publish to Power BI Service.
- In the Service, view the report—custom fonts may render if the viewer's device has the font installed; otherwise, it falls back.
10/ How To Export Power BI Into Excel
This method exports the underlying data from a specific visual (e.g., table, chart) to Excel.
- Open Your Report:
- Launch Power BI Desktop and open the report with the visual you want to export.
- Select the Visual:
- Click the table, matrix, or chart you wish to export in Report View.
- Export the Data:
- Right-click the visual > Select Export data.
- Choose Summarized data (aggregates like sums) or Underlying data (raw data, if available).
- Click Export—a .xlsx file downloads (e.g., "ExportData.xlsx").
- Open in Excel:
- Open the downloaded file to view or edit the data.
11/ How To Show Month Over Month Change In Power BI
Steps to Show Month-Over-Month Change
- Create Current Month Measure:
- In Data View, select your table, go to Table Tools > New Measure.
- Enter:
- This sums sales for the current month based on the date filter.
- Create Previous Month Measure:
- Add another measure:
- This retrieves sales from the prior month.
- Calculate Month-Over-Month Change:
- Create a new measure:
- For percentage change:
- The DIVIDE function avoids errors with zero denominators.
- Add to a Visual:
- Switch to Report View.
- Drag "OrderDate" (set to Month-Year hierarchy) to the Axis of a line chart.
- Add "MoMChange" or "MoMChangePct" to the Values field.
- Format "MoMChangePct" as Percentage (Modeling > Format > Percentage, 2 decimals).
- Enhance with Conditional Formatting:
- Select the visual, go to Format > Conditional Formatting > Values > Background Color.
- Set rules (e.g., green for >0%, red for <0%) to highlight trends.
- Time: ~10-15 minutes.
Enhance with Flexa Tables
- Add Flexa Tables: Install from AppSource, drag to canvas.
- Configure: Set Rows = Month-Year, Values = CurrentMonthSales and PreviousMonthSales, enable Variance.
- Customize: Use highlight rules for MoM changes, improving readability.
- Benefit: Displays both raw and percentage changes in one table.
12/ How To Group Slicers In Power BI
This method creates a single slicer with a drill-down structure (e.g., Year > Month).
- Create a Hierarchy:
- In Data View, select your table (e.g., "DateTable").
- Go to Modeling > New Hierarchy.
- Name it (e.g., "DateHierarchy").
- Drag fields into the hierarchy: e.g., "Year" > "Month" > "Day" (optional).
- Add a Slicer:
- Switch to Report View, select the Slicer visual from the Visualizations pane, and drag it to the canvas.
- Set the Hierarchy:
- Drag the "DateHierarchy" to the Field well of the slicer.
- The slicer displays a dropdown or drill-down interface (e.g., select Year, then Month).
- Customize:
- Go to Format > Slicer Settings > Options > Style > Dropdown to enable hierarchy navigation.
- Test by selecting a Year to filter Months.
13/ How To Connect To Data Source In Power BI
Steps to Connect to a Data Source in Power BI
- Launch Power BI Desktop:
- Open Power BI Desktop and navigate to the Home tab.
- Access Get Data:
- Click Get Data in the ribbon.
- A dropdown menu will display available connectors (e.g., Excel, SQL Server, Web).
- Select Your Data Source:
- Choose the appropriate connector:
- Excel: Navigate to your .xlsx file and select it.
- SQL Server: Enter the server name and database (e.g., "localhost\SQLEXPRESS", "SalesDB").
- Web: Paste the URL (e.g., "https://data.gov/sample.csv").
- Click Connect.
- Enter Credentials:
- For files (e.g., Excel), browse and select the file path.
- For databases (e.g., SQL), input credentials (e.g., username/password or Windows authentication).
- For web sources, authenticate if prompted (e.g., OAuth for APIs).
- Click OK.
- Load or Transform Data:
- Load: Click Load to import data directly into the model (best for simple datasets).
- Transform: Click Transform Data to open Power Query Editor for data cleaning (e.g., remove rows, adjust data types).
- Select the desired tables or queries, then click Close & Apply.
14/ How To Calculate Running Total In Power BI DAX
Steps to Calculate Running Total in Power BI DAX
- Create a Base Measure:
- In Data View, select your table (e.g., "Sales"), go to Table Tools > New Measure.
- Enter:
- This calculates the total sales for the current context.
- Create the Running Total Measure:
- Add a new measure:
- Explanation:
- CALCULATE modifies the filter context.
- ALL(Sales[OrderDate]) removes existing filters on the date.
- Sales[OrderDate] <= MAX(Sales[OrderDate]) includes all dates up to the current one.
- Alternatively, use the simpler TOTALYTD for year-to-date:
- Add to a Visual:
- Switch to Report View.
- Drag "OrderDate" (set to Month-Year hierarchy) to the Axis of a line or area chart.
- Add "RunningTotal" to the Values field.
- Format as currency or number (Modeling > Format > Currency, 2 decimals).
- Time: ~10 minutes.
- Verify the Result:
- The chart should show a cumulative line increasing with each month.
- Filter by year or category to test different contexts.
Enhance with Flexa Tables
- Add Flexa Tables: Install from AppSource, drag to canvas.
- Configure: Set Rows = Month-Year, Values = RunningTotal, enable Trend Line.
- Customize: Apply highlight rules (e.g., >10% growth in green).
- Benefit: Displays running totals with visual trends in a styled table.
15/ How To Add Current Date In Power BI
This method creates a measure to display the current date dynamically.
- Open Data View:
- Launch Power BI Desktop, load your dataset (Home > Get Data > Excel), and switch to Data View.
- Create a Measure:
- Select your table, go to Table Tools > New Measure.
- Enter:
- The TODAY() function returns the current date (e.g., 10/09/2025 as of now).
- Add to a Visual:
- Switch to Report View.
- Drag the "CurrentDate" measure to a card visual or text box.
- Format as date (Modeling > Format > Date, e.g., "MM/DD/YYYY").
16/ How To Rename A Table In Power BI
To rename a table in Power BI, follow these steps:
- Open Power BI Desktop: Launch your Power BI Desktop application and open the report or dataset containing the table you want to rename.
- Go to Model View:
- Click on the Model view (the icon with two overlapping rectangles on the left sidebar, typically the third icon from the top).
- This view displays all the tables and their relationships in your data model.
- Locate the Table:
- In the Fields pane on the right (or in the model diagram), find the table you want to rename.
- Rename the Table:
- Option 1: Fields Pane:
- Right-click the table name in the Fields pane.
- Select Rename from the context menu.
- Type the new name and press Enter.
- Option 2: Properties Pane:
- Click on the table in the Fields pane to select it.
- In the Properties pane (usually on the right side), locate the Name field under the General section.
- Edit the table name directly in the Name field and press Enter.
- Verify the Change:
- Ensure the table name has updated in the Fields pane and any visuals or queries referencing the table.
- Note that renaming a table does not affect relationships or calculations, as Power BI updates references automatically.
17/ How To Select Two Columns In Power BI
To select two columns in Power BI, the process depends on where you are in Power BI Desktop (Power Query Editor, Data View, or Report View). Below are the steps for each context:1. In Power Query Editor (Transform Data)To select two columns for transformations:
- Open Power Query Editor:
- In Power BI Desktop, go to Home > Transform Data.
- Choose the Table:
- In the Queries pane (left side), click the table containing the columns.
- Select Two Columns:
- Hold Ctrl and click the headers of the two columns in the data preview.
- Alternatively, right-click one column header, select Select Columns, and Ctrl+click the second column.
- Apply Transformations:
- With the columns selected, use the ribbon or right-click menu to perform actions like filtering, removing other columns, or changing data types.
- Save Changes:
- Click Home > Close & Apply to apply changes and return to Power BI Desktop.
2. In Data ViewTo focus on two columns:
- Go to Data View:
- Click the Data view (table icon on the left sidebar).
- Focus on Columns:
- You can’t directly select columns, but you can hide others to focus on two:
- Right-click headers of unwanted columns and choose Hide.
- This displays only the two columns of interest.
- Alternatively, use the Fields pane to drag the two columns into a visual (see below).
3. In Report View (For Visuals)To use two columns in a visual:
- Go to Report View:
- Click the Report view (canvas icon on the left sidebar).
- Create a Visual:
- Select a visual (e.g., Table or Matrix) from the Visualizations pane.
- Add Columns:
- In the Fields pane, drag the two columns from your table to the Values or Columns area of the visual.
- Alternatively, check the boxes next to the two column names to add them to the selected visual.
- Customize:
- Adjust the visual settings (e.g., formatting or sorting) as needed.
18/ How To Add A Search Box To A Slicer In Power BI
Method 1: Using the Ellipsis Menu (Three Dots) – Recommended for Most Users
- Create or Select the Slicer:
- In Report View, drag a field (text-based) from the Fields pane to the canvas to create a new slicer, or click an existing slicer to select it.
- Ensure the slicer is set to List or Dropdown style (via Format pane > Slicer settings > Options > Style).
- Enable the Search Box:
- Hover over the top-right corner of the slicer to reveal the ellipsis menu (three dots: ...).
- Click the ... menu.
- Select Search (or Search box in some versions). A checkmark will appear next to it when enabled.
- Test the Search:
- Click inside the slicer. A search box should appear at the top.
- Type keywords to filter the list dynamically.
19/ How To Create A Pie Chart In Power BI
To create a pie chart in Power BI, follow these steps in Power BI Desktop:
- Open Power BI Desktop:
- Launch Power BI Desktop and load your dataset. Ensure your data includes at least one categorical column (for segments) and one numerical column (for values).
- Go to Report View:
- Click the Report view (canvas icon on the left sidebar).
- Add a Pie Chart:
- In the Visualizations pane (right side), click the Pie chart icon (a circular chart with segments).
- A blank pie chart placeholder appears on the canvas.
- Assign Data to the Pie Chart:
- In the Fields pane, locate your table.
- Category (Legend): Drag a categorical field (e.g., "Product Category" or "Region") to the Legend area of the Fields well in the Visualizations pane.
- Values: Drag a numerical field (e.g., "Sales" or "Quantity") to the Values area. This determines the size of each pie slice.
- Example: For sales by region, drag "Region" to Legend and "Total Sales" to Values.
- Customize the Pie Chart (Optional):
- Resize: Click and drag the chart’s corners to adjust its size on the canvas.
- Format:
- Select the pie chart, then click the Format pane (paint roller icon).
- Adjust options like:
- Data Labels: Under Data labels, toggle on to show values or percentages on slices.
- Colors: Under Data colors, customize colors for each category.
- Title: Add or edit a chart title under Title settings.
- Legend: Adjust position (e.g., Top, Bottom) under Legend.
- Filters: Drag fields to the Filters pane to limit data (e.g., filter by year or region).
- Test and Refine:
- Click the pie chart to interact with it. Ensure the slices represent the data correctly.
- If the chart is too cluttered (e.g., too many categories), consider filtering to top 5–10 categories in Power Query or using a Filter to reduce items.
- For better readability, consider enabling Detail labels to show percentages or values.
- Save and Publish (Optional):
- Save your Power BI file (File > Save).
- To share, click Home > Publish to upload to Power BI Service.
20/ How To Change Data Connectivity Mode In Power BI
Steps to Change Data Connectivity Mode1. During Initial Data Source ConnectionThe connectivity mode is typically set when you first connect to a data source:
- Open Power BI Desktop and go to Home > Get Data.
- Select a Data Source (e.g., SQL Server, Excel, etc.).
- Choose Connectivity Mode:
- In the data source dialog (e.g., SQL Server connection window), you’ll see options like Import or DirectQuery (if supported by the source, e.g., SQL Server, Azure SQL, etc.).
- Select the desired mode:
- Import: Loads data into Power BI.
- DirectQuery: Queries the source in real-time (available for supported databases like SQL Server, Oracle, etc.).
- For Live Connection, choose a source like Power BI Datasets or Analysis Services and authenticate. Live Connection is automatically set and cannot be changed to Import or DirectQuery.
- Load Data:
- Click Load or Transform Data (for Import) to proceed. For DirectQuery or Live Connection, the data model connects without loading data locally.
21/ How To Delete Rows In Power BI
Steps to Delete Rows in Power BI (Power Query Editor)
- Open Power Query Editor:
- In Power BI Desktop, go to Home > Transform Data to launch the Power Query Editor.
- Select the Table:
- In the Queries pane (left side), click the table containing the rows you want to delete.
- Filter Rows to Delete:
- Using Filters:
- Click the dropdown arrow in the header of the column you want to filter (e.g., a column with specific values to remove, like "Null" or "Error").
- Uncheck the values you want to delete (e.g., deselect "Null" or specific categories) or use the Text Filters, Number Filters, or Date Filters for custom conditions.
- Click OK to apply the filter, which removes the unselected rows from the query output.
- Example: To delete rows where "Sales" is blank, click the "Sales" column dropdown, go to Number Filters > Does Not Equal, and enter 0 or leave blank for nulls.
- Remove Specific Rows Manually:
- If you need to delete specific rows (e.g., by row number or visual inspection):
- Select the rows in the data preview by holding Ctrl and clicking the row numbers on the left.
- Right-click a selected row number and choose Remove Rows > Remove Selected Rows.
- Note: This is less common and not recommended for large datasets, as it’s manual and not scalable.
- Remove Rows Based on Conditions:
- For advanced filtering:
- Go to Home > Remove Rows > Remove Rows and choose options like:
- Remove Top Rows or Remove Bottom Rows: Specify a number to delete rows from the start or end.
- Remove Blank Rows: Deletes rows where all columns are null or empty.
- Remove Duplicates: Deletes duplicate rows based on all or selected columns (select columns first, then Home > Remove Rows > Remove Duplicates).
- Remove Errors: Deletes rows with error values in any column.
- Conditional Logic: Use Filter Rows (under Home > Advanced Editor or column filters) to write custom conditions (e.g., remove rows where "Age" < 18).
- Apply Changes:
- Once you’ve filtered or removed rows, click Home > Close & Apply to save the changes and load the updated data into Power BI.
- The deleted rows will no longer appear in the data model, visuals, or reports.
22/ How To Calculate Attrition Rate In Power BI
Steps to Calculate Attrition Rate in Power BI1. Prepare Your DataEnsure your dataset includes the necessary fields. Common columns include:
- Employee ID: Unique identifier for each employee.
- Hire Date: Date the employee was hired.
- Termination Date or Status: Indicates if the employee left (e.g., a date or a flag like "Active"/"Terminated").
- Date Table: A separate date table for time-based calculations (recommended for accurate period filtering).
If your data isn’t clean (e.g., missing termination dates or inconsistent formats), use Power Query Editor (Home > Transform Data) to:
- Fill missing values (e.g., replace blanks with a future date like "12/31/9999" for active employees).
- Create a status column (e.g., if Termination Date is not null, mark as "Terminated").
- Remove irrelevant rows (e.g., test records).
Example Dataset:
| EmployeeID | HireDate | TerminationDate | Status |
| 001 | 2023-01-15 | 2025-06-30 | Terminated |
| 002 | 2022-03-10 | NULL | Active |
2. Create a Date Table (Optional but Recommended)For time-based calculations (e.g., monthly or yearly attrition), a date table helps with filtering and grouping:
- Go to Modeling > New Table.
- Use DAX to create a date table:
- DAX
- Add columns for Year, Month, etc.:
- DAX
- Mark it as a Date Table (Modeling > Set as Date Table, select Date as the key).
- Relate the Date Table to your employee data (e.g., HireDate or TerminationDate) in Model View.
3. Calculate Employees Who LeftCreate a measure to count employees who left during a specific period:
- Go to Modeling > New Measure.
- Use DAX to count terminations:
- DAX
- This counts rows where TerminationDate is not blank and falls within the selected date range (e.g., a month or year).
4. Calculate Average Number of EmployeesThe average number of employees is typically the average of the headcount at the start and end of the period:
- Count Employees at Start and End:
- Start of Period:
- DAX
- End of Period:
- DAX
- Average Headcount:
- DAX
5. Calculate Attrition RateCombine the measures to calculate the attrition rate:
- Create a new measure:
- DAX
- This divides the number of employees who left by the average headcount and multiplies by 100 to get a percentage.
- The 0 in DIVIDE ensures a zero is returned if the denominator is zero to avoid errors.
6. Visualize the Attrition Rate
- Go to Report View.
- Add a visual (e.g., Card, Table, or Line Chart).
- Drag the AttritionRate measure to the visual’s Values field.
- Add a date field (e.g., Year or YearMonth from the Date Table) to the Axis or Filters to show attrition over time.
- Use a Slicer for dynamic filtering (e.g., select a specific year or month).
7. Format and Validate
- Format the AttritionRate measure as a percentage:
- In Modeling, select the AttritionRate measure, then set Format to Percentage with 2 decimal places.
- Test the calculation by filtering for a known period and verifying against manual calculations.
