Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Line and Stacked Column Chart: Line Adjustment

Hello everyone,

I have a stacked column and line chart where colums show actual value of the attributes

and the line indicates the target value. The thing is that I only want to show target value for the green column at the right hand side. Is there a way to display only the part of the line between two black strings? (Please see the screenshot).
Actually, I don't get why the line show target value for all bars. Because other columns don't have a target value and I thought it would show zero.

Thank you.

  • Anonymous , Create a measure like

     

    If(max(Table[Axis Column]) = "Col4", [Target], blank() )

     

    It will show a dot, using marker convert it into - or _

  • Anonymous's avatar
    Anonymous
    4 years ago

    Thank you Thang, meanwhile I figured it out actually. The Idea was to get only the sum of  sales target values (but unique numbers) of ProductA in the Product Line table.


    I wrote the following formula:
    Line- ProductA Target=
    If(MAX('1st iteration'[Product Line])="ProductA", SUMX(DISTINCT('1st iteration'[Target Product A]), ('1st iteration'[Target Product A])), BLANK())

4 Replies

  • Anonymous , Create a measure like

     

    If(max(Table[Axis Column]) = "Col4", [Target], blank() )

     

    It will show a dot, using marker convert it into - or _

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you amitchandak for the answer
      I wrote the following formula:

      "Line-ProductA Target = If(MAX('1st iteration'[Product Line])="ProductA", MAXX(DISTINCT('1st iteration'[ProductA]), MAX('1st iteration'[Target ProductA])), BLANK())"

      It kinda worked but since it's MAXX function I only get the highest value (450 in my case) but I need sum of of the unique numbers. Like 540(90+450), I have 5 unique numbers in 1080 rows. 


      • v-xiaotang's avatar
        v-xiaotang
        Community Support

        Hi Anonymous 

        Thanks for reaching out to us.

        >> It kinda worked but since it's MAXX function I only get the highest value (450 in my case) but I need sum of of the unique numbers. Like 540(90+450), I have 5 unique numbers in 1080 rows. 

        Could you share some sample data for this? then I can write the measure.

         

        Best Regards,

        Community Support Team _Tang

        If this post helps, please consider Accept it as the solution to help the other members find it more quickly.