Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bratiranjan
New Member

Table Visual Not Displaying Individual Rows for Multiple Campaigns – Need Help

Hi Power BI Community,

We’ve developed an Aggregate View page in our Power BI dashboard, and we’re facing an issue with a table visual not behaving as expected when multiple Campaign IDs are selected.

Setup:

  • A single slicer based on Campaign_ID (multi-select enabled)

  • A table visual intended to display:

    • Campaign_ID in the first column

    • KPIs such as:

      • Total Clicks

      • Click Through Rate (CTR)

      • Total Orders

      • Conversion Rate

      • Total Revenue

Expected Behavior:

  • When one or more Campaign IDs are selected:
    ➤ The table should show one row per Campaign_ID with its respective KPI values.

  • When no Campaign is selected:
    ➤ The table should show a single row with "XXX" as placeholders for both the Campaign_ID and all KPIs.

Current Issue:

  • When multiple Campaign IDs are selected, the table only shows a single aggregated row, instead of separate rows per campaign.

Objective:

We want to adjust the visual or DAX logic so that:

  1. The table displays individual rows per campaign when multiple are selected.

  2. It shows a single "XXX" row when no campaign is selected.

Has anyone encountered this behavior before or can point us toward a working DAX pattern or modeling approach to solve this?

Thanks in advance for your help!

1 ACCEPTED SOLUTION
burakkaragoz
Community Champion
Community Champion

Hi @bratiranjan ,

 

This usually happens when your DAX measure or table logic doesn’t respect row context properly.

Try this:

  1. Make sure your table visual includes Campaign_ID from the correct table (not from a related lookup table).
  2. Use this pattern for your measures:
Total Clicks = 
IF (
    ISFILTERED('Campaign'[Campaign_ID]),
    CALCULATE(SUM('YourTable'[Clicks])),
    BLANK()
)
  1. To show "XXX" when nothing is selected, you can add a calculated table like:
Fallback = 
IF (
    ISFILTERED('Campaign'[Campaign_ID]),
    VALUES('Campaign'[Campaign_ID]),
    DATATABLE("Campaign_ID", STRING, {{"XXX"}})
)

Then use this table in your visual instead of the original one.

Let me know if you want help adjusting the DAX for your KPIs.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I’d be grateful for a Kudos if you found it helpful.

Translation and formatting supported by AI assistance.

View solution in original post

8 REPLIES 8
v-tsaipranay
Community Support
Community Support

Hi @bratiranjan ,

 

We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.

 

Thank you.

 

v-tsaipranay
Community Support
Community Support

Hi @bratiranjan ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

 

Thank you.

v-tsaipranay
Community Support
Community Support

Hi @bratiranjan  ,

 

I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.

 

Thank you.

v-tsaipranay
Community Support
Community Support

Hi @bratiranjan ,

Thank you for reaching out to the Microsoft Fabric Community Forum and thank you @DataNinja777  and @burakkaragoz for your support.

 

The behavior you're seeing happens because Power BI aggregates rows automatically if Campaign_ID isn't part of the visual. To display each campaign as a separate row, make sure to add Campaign_ID to your table visual.

If you want to handle both scenarios showing individual rows when one or more Campaign_IDs are selected, and displaying a single row with "XXX" values when none are selected you can create a calculated table using DAX. Use ISFILTERED to detect slicer selections and return either the actual KPIs or a fallback row created with DATATABLE. Applying the FORMAT function helps keep data types consistent when mixing numbers and text like "XXX".

This method gives you flexibility and ensures your visual behaves correctly whether or not any Campaign_IDs are selected.

 

Hop this help you understand, please reach out for further assistance.

Thank you.

burakkaragoz
Community Champion
Community Champion

Hi @bratiranjan ,

 

This usually happens when your DAX measure or table logic doesn’t respect row context properly.

Try this:

  1. Make sure your table visual includes Campaign_ID from the correct table (not from a related lookup table).
  2. Use this pattern for your measures:
Total Clicks = 
IF (
    ISFILTERED('Campaign'[Campaign_ID]),
    CALCULATE(SUM('YourTable'[Clicks])),
    BLANK()
)
  1. To show "XXX" when nothing is selected, you can add a calculated table like:
Fallback = 
IF (
    ISFILTERED('Campaign'[Campaign_ID]),
    VALUES('Campaign'[Campaign_ID]),
    DATATABLE("Campaign_ID", STRING, {{"XXX"}})
)

Then use this table in your visual instead of the original one.

Let me know if you want help adjusting the DAX for your KPIs.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I’d be grateful for a Kudos if you found it helpful.

Translation and formatting supported by AI assistance.

Hi @burakkaragoz, Thanks so much for providing the solution! I’ll try implementing it on my end and will let you know how it goes. Once confirmed, I’ll mark it as the Accepted Solution to help others as well. Appreciate your support!

DataNinja777
Super User
Super User

Hi @bratiranjan ,

 

It sounds like you're encountering a common data context issue in Power BI. The reason your table visual is showing a single aggregated row for multiple selected campaigns is likely because the visual itself doesn't include the Campaign_ID in its fields. Without it, the DAX measures correctly calculate the totals for everything you've selected in the slicer but have no instruction to break down those results per campaign. To fix this, simply select your table visual and drag the Campaign_ID field into the Columns bucket in the Visualizations pane. This tells Power BI to create a separate row for each unique campaign.

Your Key Performance Indicator (KPI) measures should be standard aggregations. When placed in a table that has the Campaign_ID context, they will automatically calculate correctly for each individual row. Your measures should look something like this:

Total Clicks = SUM('YourFactTable'[Clicks])
Total Orders = SUM('YourFactTable'[Orders])
Total Revenue = SUM('YourFactTable'[Revenue])
Click Through Rate = DIVIDE([Total Clicks], SUM('YourFactTable'[Impressions]))
Conversion Rate = DIVIDE([Total Orders], [Total Clicks])

To achieve your second objective—displaying a single row of "XXX" placeholders when no campaign is selected—the most effective method is to create a new summary table with conditional logic using DAX. This table will form the basis of your visual. In the Modeling tab, select New Table and use the following DAX expression. Remember to replace the table and column names with those from your own model.

Campaign Summary Table =
IF(
    NOT(ISFILTERED('Campaigns'[Campaign_ID])),
    // If NO campaign is selected, create and return a table with one "XXX" row.
    DATATABLE(
        "Campaign_ID", STRING,
        "Total Clicks", STRING,
        "Click Through Rate", STRING,
        "Total Orders", STRING,
        "Conversion Rate", STRING,
        "Total Revenue", STRING,
        {
            { "XXX", "XXX", "XXX", "XXX", "XXX", "XXX" }
        }
    ),
    // If ANY campaign IS selected, return a summarized table with actual data.
    SUMMARIZECOLUMNS(
        'Campaigns'[Campaign_ID],
        "Total Clicks", FORMAT([Total Clicks], "0"),
        "Click Through Rate", FORMAT([Click Through Rate], "0.00%"),
        "Total Orders", FORMAT([Total Orders], "0"),
        "Conversion Rate", FORMAT([Conversion Rate], "0.00%"),
        "Total Revenue", FORMAT([Total Revenue], "$#,##0")
    )
)

After creating this Campaign Summary Table, use its columns to build your table visual. The ISFILTERED function checks if a selection has been made on the slicer. If not, it generates the placeholder row using DATATABLE. If a selection is made, it creates a properly summarized table of your campaign data. Note the use of the FORMAT function, which converts all the calculated KPI values to text, ensuring the data type is consistent with the "XXX" string placeholders. Your original slicer will still work perfectly as the DAX expression references the column it filters.

 

Best regards,

Hi @DataNinja777 , Thanks so much for providing the solution! I’ll try implementing it on my end and will let you know how it goes. Once confirmed, I’ll mark it as the Accepted Solution to help others as well. Appreciate your support!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors