Forum Discussion
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
- Anonymous4 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
- Pragati11Super User
HI Anonymous ,
Not sure on what you are asking here. Try to add more details like sample data, screenshots of charts, etc.
Refer following to understand what details can be added to a query and how:
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Thanks,
Pragati
- AnonymousNot 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?
- Tahreem24Super User
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?
- AnonymousNot applicable
yes
- AnonymousNot 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