Forum Discussion

Mohammad-Almuni's avatar
Mohammad-Almuni
New Member
2 years ago
Solved

How to get Value from Visualization

Hello, I have two visualizations and I need to get the value from each one and calculate them as a percentage then show the results on a third visualization as below screen:

The Measure should be : (the value 1 from visualization B) /(the value 1 from visualization A) and so on.

 

 

  • Here's a basic guideline:

    1. Create Visualizations A and B:

      • Create the two visualizations (A and B) that you want to compare.
    2. Identify the Data Fields:

      • Identify the data fields that you will be using in your calculations. For example, you may have a column in each visualization that represents the value you want to compare.
    3. Create Calculated Columns or Measures:

      • Go to the "Data" view and create calculated columns or measures for the values you need. For example:
        • For Visualization A: Value_A = [your formula]
        • For Visualization B: Value_B = [your formula]
    4. Create a New Measure for the Percentage Calculation:

      • Create a new measure to calculate the percentage. For example:

    Percentage = DIVIDE([Value_B], [Value_A], 0)

     

      • Here, DIVIDE is a DAX function that handles division and helps avoid errors in case of division by zero.
    1. Create the Third Visualization:

      • Create a new visualization (e.g., a card, table, or any other type of visual) where you want to display the calculated percentage.
    2. Place the Measure in the Third Visualization:

      • Place the newly created measure (Percentage) in the values area of the new visualization.
    3. Format the Visual:

      • Format the visual as needed, such as setting the data label format to percentage.
    4. Adjust Interactions (Optional):

      • If you want to control interactions between Visualizations A, B, and the new one, you can adjust the interaction settings by going to the "Format" pane and using the "Edit interactions" option.
    5. Review and Test:

      • Review the new visualization to ensure it displays the calculated percentage correctly. Test it with different scenarios to validate the accuracy of the calculation.

    Remember, the specifics of these steps may vary based on the nature of your data and the visualizations you are working with. Make sure to adapt the steps to fit your specific use case in Power BI.

1 Reply

  • 123abc's avatar
    123abc
    Community Champion

    Here's a basic guideline:

    1. Create Visualizations A and B:

      • Create the two visualizations (A and B) that you want to compare.
    2. Identify the Data Fields:

      • Identify the data fields that you will be using in your calculations. For example, you may have a column in each visualization that represents the value you want to compare.
    3. Create Calculated Columns or Measures:

      • Go to the "Data" view and create calculated columns or measures for the values you need. For example:
        • For Visualization A: Value_A = [your formula]
        • For Visualization B: Value_B = [your formula]
    4. Create a New Measure for the Percentage Calculation:

      • Create a new measure to calculate the percentage. For example:

    Percentage = DIVIDE([Value_B], [Value_A], 0)

     

      • Here, DIVIDE is a DAX function that handles division and helps avoid errors in case of division by zero.
    1. Create the Third Visualization:

      • Create a new visualization (e.g., a card, table, or any other type of visual) where you want to display the calculated percentage.
    2. Place the Measure in the Third Visualization:

      • Place the newly created measure (Percentage) in the values area of the new visualization.
    3. Format the Visual:

      • Format the visual as needed, such as setting the data label format to percentage.
    4. Adjust Interactions (Optional):

      • If you want to control interactions between Visualizations A, B, and the new one, you can adjust the interaction settings by going to the "Format" pane and using the "Edit interactions" option.
    5. Review and Test:

      • Review the new visualization to ensure it displays the calculated percentage correctly. Test it with different scenarios to validate the accuracy of the calculation.

    Remember, the specifics of these steps may vary based on the nature of your data and the visualizations you are working with. Make sure to adapt the steps to fit your specific use case in Power BI.