Forum Discussion
Anonymous
1 year agoNot applicable
Filter problems
My _Measure is not delivering what I expected. I need a % for value on Status vs total Supid measure give 100% when filterd using Status Any Ideas? Status and Values are columns in the same ...
- 1 year ago
Hi Anonymous ,
Try this measure:
_Measure = VAR D = [Value] -- The current value based on filters VAR AD = CALCULATE( [Value], ALLEXCEPT('FactTable', 'FactTable'[Other Columns...]) -- Preserve filters on other columns except Status ) VAR RESULT = DIVIDE(D, AD, BLANK()) -- Calculate the percentage RETURN RESULTIf the above dont work, please consider to try this one with SUMX:
_Measure = VAR D = [Value] VAR AD = SUMX( ALL('FactTable'[Status]), CALCULATE(SUM('FactTable'[Values])) ) VAR RESULT = DIVIDE(D, AD, BLANK()) RETURN RESULT
Anonymous
1 year agoNot applicable
Thanks all you guys for the replys, unfortunatly non of them have solve my issue.
Then thing is that this format for a % measure work fine when column i don´t want filterd are in a dim tabel and not in the fact were the value is.
So maby issue is that value and column I want to removefilter on are in the same table?
Bibiano_Geraldo
Super User
1 year agoHi Anonymous ,
Try this measure:
_Measure =
VAR D = [Value] -- The current value based on filters
VAR AD =
CALCULATE(
[Value],
ALLEXCEPT('FactTable', 'FactTable'[Other Columns...]) -- Preserve filters on other columns except Status
)
VAR RESULT =
DIVIDE(D, AD, BLANK()) -- Calculate the percentage
RETURN
RESULT
If the above dont work, please consider to try this one with SUMX:
_Measure =
VAR D = [Value]
VAR AD =
SUMX(
ALL('FactTable'[Status]),
CALCULATE(SUM('FactTable'[Values]))
)
VAR RESULT =
DIVIDE(D, AD, BLANK())
RETURN
RESULT