Forum Discussion
CLCastroEn
Helper IV
5 years agoremove filters from the total
Hello! I'm making a 100% stacked column chart. which is like this: where the value field is given by the store count and legends are the state of the stores. Example: 81.6% do room count wit...
- 5 years ago
Hello @CLCastroEn ,
Use "Stacked Column Chart" instead.
First, create a dimension table as shown below:
Table 2 = VALUES('Table'[Room])Next, create a measure as follows:
Measure = var _selected=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Room] in FILTERS('Table 2'[Room])&&'Table'[Room]=MAX('Table'[Room]))) var _total=CALCULATE(SUM('Table'[value]),ALL('Table')) Return IF(ISFILTERED('Table 2'[Room])=BLANK(),DIVIDE(SUMX(FILTER(ALL('Table'),'Table'[Room]=MAX('Table'[Room])),'Table'[value]),SUMX(ALL('Table'),'Table'[value])),IF(MAX('Table'[Room]) in FILTERS('Table 2'[Room]),DIVIDE(_selected,_total),BLANK()))And you'll see:
For the related .pbix file, see attachment pls.
Saludos
KellyHave I answered your question? Mark my position as a solution!
v-kelly-msft
Community Support
5 years agoHello @CLCastroEn ,
Use "Stacked Column Chart" instead.
First, create a dimension table as shown below:
Table 2 = VALUES('Table'[Room])
Next, create a measure as follows:
Measure =
var _selected=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Room] in FILTERS('Table 2'[Room])&&'Table'[Room]=MAX('Table'[Room])))
var _total=CALCULATE(SUM('Table'[value]),ALL('Table'))
Return
IF(ISFILTERED('Table 2'[Room])=BLANK(),DIVIDE(SUMX(FILTER(ALL('Table'),'Table'[Room]=MAX('Table'[Room])),'Table'[value]),SUMX(ALL('Table'),'Table'[value])),IF(MAX('Table'[Room]) in FILTERS('Table 2'[Room]),DIVIDE(_selected,_total),BLANK()))
And you'll see:
For the related .pbix file, see attachment pls.
Saludos
Kelly
Have I answered your question? Mark my position as a solution!