Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Display two remarks as one

i have bart chart with legend as remarks

remarks are

  • a
  • b
  • c
  • d

now here i need to display b and c values at a time and according to that chart will change 

like 

  • a
  • b & c
  • d
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    Put it into the visual object to display:

    1. Create measure.

    Flag =
    var _sum=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])&&'Table'[group]=MAX('Table'[group])))
    var _SumB=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])&&'Table'[group]="B"))
    var _SumC=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])&&'Table'[group]="C"))
    RETURN
    IF(
    OR(MAX('Table'[group])="B",MAX('Table'[group])="C")&&OR(MAX('Table'[date])=2016,MAX('Table'[date])=2017),_SumB+_SumC,_sum)

    2. Result:

    In 2016 and 2017, the value of B and C displayed in the visual object is the added value, and the rest remain unchanged

     

    Best Regards,

    Liu Yang

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

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      here in aleria and bahrain are diff things but i need both are like aleria & bahrain single and according to that values also change in visual. ex for aleria value is 100 and bahrain value is 200 then ineed to displaye aleria & bahrain as 300 how can i achieve it?

  • Anonymous I am not quite well sure and understood your issue. But what I got is that you want to club together the remark value b & c. is this right?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      yes

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    Put it into the visual object to display:

    1. Create measure.

    Flag =
    var _sum=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])&&'Table'[group]=MAX('Table'[group])))
    var _SumB=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])&&'Table'[group]="B"))
    var _SumC=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])&&'Table'[group]="C"))
    RETURN
    IF(
    OR(MAX('Table'[group])="B",MAX('Table'[group])="C")&&OR(MAX('Table'[date])=2016,MAX('Table'[date])=2017),_SumB+_SumC,_sum)

    2. Result:

    In 2016 and 2017, the value of B and C displayed in the visual object is the added value, and the rest remain unchanged

     

    Best Regards,

    Liu Yang

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