Forum Discussion

Karthik50's avatar
Karthik50
Frequent Visitor
2 years ago
Solved

Scatter Plot measure not helping dynamic color..

Hi,

I have this table:

ProductMonthSales
A1100
B1200
C1150
A2200
B2250
C2350
A3300
B3350
C3400


I have a scatter plot (which shows 'Sales' by 'Product'):

For the dynamic color of the dots, I have measures below:



 

The dots are all of the color green. However, when I change value of the variable pointing to "Measure 1", to a hardcoded vlaue, the color of the dots change in the scatter plot.





I believe the hardcoded value works as it is not impacted by context. How to ensure the first option (of leveraging Measure 1) works as expected as well?

 

 




  • I was exploring ways to present data an change the colors of the dots through Dax. The scatter plot as "sum of sales" on the X-axis and the 'Product' Name in the "Values" section.

    I can see using 'Calculate', I am able to get the colors change according to the product choosen.  So "Measure 1" is re-written as follows:


    CALCULATE
    ( SUM(Sheet1[Sales]) / DISTINCTCOUNT(Sheet1[Product]), ALLSELECTED(Sheet1) )






3 Replies

  • Karthik50's avatar
    Karthik50
    Frequent Visitor

    Just to add some more info, I tried adding "Measure 1" as a columm and I got the below:

    I think the context transistion is impacting the comparison....

  • what's the reason for choosing a scatter plot?  Where is your second value ?

    • Karthik50's avatar
      Karthik50
      Frequent Visitor

      I was exploring ways to present data an change the colors of the dots through Dax. The scatter plot as "sum of sales" on the X-axis and the 'Product' Name in the "Values" section.

      I can see using 'Calculate', I am able to get the colors change according to the product choosen.  So "Measure 1" is re-written as follows:


      CALCULATE
      ( SUM(Sheet1[Sales]) / DISTINCTCOUNT(Sheet1[Product]), ALLSELECTED(Sheet1) )