Forum Discussion
Filtering by two conditions
- 9 years ago
Anonymous from what you can see the measure does actually work however it expects some sort of context,
for example if you place it on a matrix you would see that the value woudl be summed by invoice number and measure test would show 1 and 1 for invoice 50 and 54
so to use it on a card, i think you actually need to summarise this in a table
try this
Table Test =
SUMMARIZE (
Table1,
Table1[Invoice No],
"Measure Test", CALCULATE (
DISTINCTCOUNT ( Table1[Invoice No] ),
FILTER (
Table1,
SUM ( Table1[Value] ) >= 1000
&& SUM ( Table1[Value] ) <= 2000
&& Table1[Product Code] IN { "101", "102" }
)
)
) - 9 years ago
Anonymous
Hi,
vanessafvg ‘s formula is wonderful. I just add a few parts. Try this measure please. This can be used in a card visual.
Measure = COUNTROWS ( FILTER ( SUMMARIZE ( Table1, Table1[Invoice No], "Measure Test", CALCULATE ( DISTINCTCOUNT ( Table1[Invoice No] ), FILTER ( Table1, SUM ( Table1[Value] ) >= 1000 && SUM ( Table1[Value] ) <= 2000 && Table1[Product Code] IN { 101, 102 } ) ) ), [Measure Test] = 1 ) )Best Regards!
Dale
Anonymous and if you place it in your table?
- Anonymous9 years agoNot applicable
- vanessafvg9 years agoCommunity Champion
Anonymous from what you can see the measure does actually work however it expects some sort of context,
for example if you place it on a matrix you would see that the value woudl be summed by invoice number and measure test would show 1 and 1 for invoice 50 and 54
so to use it on a card, i think you actually need to summarise this in a table
try this
Table Test =
SUMMARIZE (
Table1,
Table1[Invoice No],
"Measure Test", CALCULATE (
DISTINCTCOUNT ( Table1[Invoice No] ),
FILTER (
Table1,
SUM ( Table1[Value] ) >= 1000
&& SUM ( Table1[Value] ) <= 2000
&& Table1[Product Code] IN { "101", "102" }
)
)
)