Forum Discussion

SC30GSWNBA's avatar
SC30GSWNBA
Frequent Visitor
2 years ago

Color Items Above Average Line

Hello All,

 

I need some help with respect to a Scatter Plot. I have got a dataset as follows -

 

DateEmployeeSalesOverhead
06/21/2024E12525
06/21/2024E22525
06/21/2024E31020
06/22/2024E12525
06/22/2024E22525
06/22/2024E32010
06/23/2024E12030
06/23/2024E23040
06/23/2024E32050

 

I have created a Baseline Percentage Measure as follows - 

 

Baseline_Percentage = SUM('Baseline Data'[Sales])/(SUM('Baseline Data'[Sales])+SUm('Baseline Data'[Overhead]))
 
Based on Baseline_Percentage I have been able to create a scatter plot as follows -
 

Baseline percentage on Y axis and Sum of Sales on X axis.

 

I now need to show the items above Baseline Average i.e 44.4% across three days as separate color and items below baseline average as separate color but not able to do so. Could you please help me solve the issue ? Also I need to ensure that the chart works perfectly fine based on date slicer selection shown below -

 

 

 

 

2 Replies

  • SC30GSWNBA 
    You can conditionally format the marker colors in scatter plot

     

    Conditional formatting window:

     

    if you keep the thresholds dyanmic then you can create a sonditional formatting measure and apply the same.

     

    If I understnad correctly then I think your baseline_percentage measure is incorrect. You can use this pattern

     

    Baseline_Percentage = 
    Var __Sales = sum('Baseline_data'[Sales])
    Var __TotalSales = calculate(sum('Baseline_data'[Sales]), removefilters('Baseline_data'[Employee]))
    Var __OverHead = sum('Baseline_data'[Overhead]
    Var Result = Divide(sum('Baseline_data'[Sales]), __TotalSales) + __OverHead
    return Result

     

     



    Need Power BI consultation, hire me on UpWork .


    If the post helps please give a thumbs up



    If it solves your issue, please accept it as the solution to help the other members find it more quickly.




    Tharun



    • SC30GSWNBA's avatar
      SC30GSWNBA
      Frequent Visitor

      Thank you for the solution tharunkumarRTK, but no the Baseline calculation is correct and I do not want to change my view for scatter plot. It should strictly be Baseline Percentage vs Sales. I want to show the employees who are below baseline percentage.