Forum Discussion

Kgraham01's avatar
Kgraham01
Frequent Visitor
2 years ago
Solved

Filter a Matrix Visual When one value is never empty

Hello all,  Needing a bit of help for as I am learning power BI. I am using power BI to report out of our Dynamics 365 sales CRM.  I have a matrix that is listing all the opportunities showing thei...
  • Shravan133's avatar
    2 years ago

    To achieve your goal of filtering opportunities while maintaining hyperlinks, you can use measures and conditional formatting. Here's a step-by-step guide to help you resolve the issue:

    1. Create a Measure for the Hyperlink:

      • Instead of directly adding a hyperlink column, create a measure that generates the hyperlink dynamically based on the filtered data.

      • Use the following DAX formula as an example:

        DAX
        Copy code
        OpportunityLink = IF( HASONEVALUE(Opportunities[OpportunityID]), "https://yourcrm.url/opportunity/" & VALUES(Opportunities[OpportunityID]), BLANK() )

        This measure ensures that the link is only generated when a single opportunity is selected.

    2. Add the Measure to the Matrix:

      • Add the OpportunityLink measure to your matrix visual instead of the static hyperlink column.
      • This way, the hyperlink will only appear when the data is filtered to a specific opportunity.
    3. Adjust Visual Interactions:

      • Ensure that the interactions between visuals are set correctly.
      • Go to the "Format" pane, select "Edit interactions," and make sure the visuals interact with each other as intended. Verify that the matrix visual is set to be filtered by the other visuals.
    4. Conditional Formatting for Hyperlinks:

      • Use conditional formatting to apply hyperlinks dynamically.
      • In your matrix visual, go to the field where you want the hyperlink to appear.
      • Click on the dropdown arrow next to the field name and select "Conditional formatting."
      • Choose "Web URL" and then set it to use the OpportunityLink measure you created