Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Not be grouped by

Hey! I got a bar chart, x-axis is list of brands, y-axis measure. Looks like this:

(can't show x-acis due to company agreement). I need a measure that will be an average value of y-axis measure by x-axis category. I can calculate this measure: 

Average sat =
AVERAGEX(
    KEEPFILTERS(VALUES('Both'[Brand])),
    CALCULATE([% satisfaction top 2]))
But when I put it as a line on barchart it don't shows me what I need, I need a straight line.
 
  • Hi:

    Can you try a Line & Clustered chart, using the overall measure as seconday Y? I'll paste image for more clarity. My example is on profit margin %, but can be done for your overall SAT measure. I hope this helps..

    Measure for flat line:

    Profit Margin% ALL =
    var profit = CALCULATE(SUM(Data[Profit]),ALL(Data))
    var sales = CALCULATE(SUM(Data[Sales]),ALL(Data))
    return
    DIVIDE(profit,sales)

6 Replies

  • Hi:

    Can you try a Line & Clustered chart, using the overall measure as seconday Y? I'll paste image for more clarity. My example is on profit margin %, but can be done for your overall SAT measure. I hope this helps..

    Measure for flat line:

    Profit Margin% ALL =
    var profit = CALCULATE(SUM(Data[Profit]),ALL(Data))
    var sales = CALCULATE(SUM(Data[Sales]),ALL(Data))
    return
    DIVIDE(profit,sales)
    • Anonymous's avatar
      Anonymous
      Not applicable

      I won't work because let's say your sales in my case is a measure, not a column

      • Whitewater100's avatar
        Whitewater100
        Icon for Solution Sage rankSolution Sage

        Hi:

        Can you provide example data (and image of key tables in your data model)as it should be possible to create a measure showing the values you want as a straight line? 

        Thanks

    • Anonymous's avatar
      Anonymous
      Not applicable

      The answer is correct, very cool. But I should use not constant line, but average line, thanks, I didn't know about these feature.