Forum Discussion
gzai
4 years agoHelper I
Set default data based on specific rule filter
Hi all, I have table : Table_A Client Type Category Value Client A A AA 10 Client B B AA 15 Client B A AB 8 Client C C AC 5 Client A D A...
- 4 years ago
After trying several times,
when using your measure, it's actually correct. but there is a little bug when using isfiltered. isfiltered will return true when nothing is selected (don't know how).
I finally combined your measure with measure I've made and make some changes.Measure :
Filtered Type =IF(CALCULATE(ISFILTERED(Table_A[Type]), ALLSELECTED(Table_A[Type])),CALCULATE(SUM(Table_A[Value]),ALLSELECTED(Table_A[Type])),CALCULATE(SUM(Table_A[Value]),FILTER(Table_A, Table_A[Type] in ALLSELECTED(Table_B[Type]) )))Thanks amitchandak
gzai
4 years agoHelper I
After trying several times,
when using your measure, it's actually correct. but there is a little bug when using isfiltered. isfiltered will return true when nothing is selected (don't know how).
I finally combined your measure with measure I've made and make some changes.
Measure :
Filtered Type =
IF(
CALCULATE(ISFILTERED(Table_A[Type]), ALLSELECTED(Table_A[Type])),
CALCULATE(SUM(Table_A[Value]),
ALLSELECTED(Table_A[Type])
),
CALCULATE(SUM(Table_A[Value]),
FILTER(Table_A, Table_A[Type] in ALLSELECTED(Table_B[Type]) )
)
)
Thanks amitchandak