Forum Discussion
srkase
6 years agoHelper IV
MULTIPLE FILTRATION
I have the data like this... YEAR SHORTNAME DEALER TYPE PRODUCT APR MAY JUN JUL AUG SEP OCT NOV DEC JAN FEB MAR TOT CATEGORY 20182019 AB A STD PROD 10 0 0 0 0 0 ...
- 6 years ago
v-chuncz-msft wrote:You may use the following measure.
Measure = COUNTROWS ( FILTER ( VALUES ( cab[DEALER] ), CALCULATE ( SUM ( cab[QTY] ) <= 1000 ) ) )it gives only true or false...
I applied this measure ... and works fine..
qty500 = CALCULATE (DISTINCTCOUNT('BREAKUP CABLES'[DEALER] ),FILTER ( ALL ( 'BREAKUP CABLES'[DEALER] ), 'BREAKUP CABLES'[sumqty]<=499))
srkase
6 years agoHelper IV
Dear Mussaedna ,
I have used query editor to unpivot the data and applied the measure what you have given,,,
but couldnt get the result
mussaenda
6 years agoCommunity Champion
If you will try it on the data you gave, it will work.
if it didn't work, you should at least explain why or what problem you have encountered so it can be resolved.
Thank you.
- srkase6 years agoHelper IV
THIS WAS THE SAMPLE DATA
YEAR SHORTNAME DEALER TYPE PRODUCT CATEGORY MONTH QTY 20192020 CBE A STD A CABLE APR 1000 20192020 CBE A STD B CABLE APR 3000 20192020 CBE A STD A CABLE APR 1738 20192020 CBE A STD B CABLE APR 3000 20192020 CBE A STD A CABLE APR 3940 20192020 CBE B STD B CABLE APR 1000 20192020 CBE C STD A CABLE APR 1000 20192020 CBE C STD B CABLE APR 1800 20192020 CBE C STD A CABLE APR 3000 20192020 CBE D STD B CABLE APR 1000 20192020 CBE D STD A CABLE APR 1000 20192020 CBE D STD B CABLE APR 2869 20192020 CBE D STD A CABLE APR 3000 20192020 CBE E STD B CABLE APR 1000 20192020 CBE E STD A CABLE APR 872 20192020 CBE E STD B CABLE APR 4000 20192020 CBE F STD A CABLE APR 1000 20192020 CBE F STD B CABLE APR 2000 20192020 CBE G STD A CABLE APR 1000 20192020 CBE G STD B CABLE APR 1000 20192020 CBE G STD A CABLE APR 2000 20192020 CBE G STD B CABLE APR 6000 20192020 CBE H STD A CABLE APR 2000 20192020 CBE I STD B CABLE APR 2000 20192020 CBE I STD A CABLE APR 3877 20192020 CBE I STD B CABLE APR 4000 20192020 CBE J STD A CABLE APR 1000 20192020 CBE J STD B CABLE APR 2000 20192020 CBE J STD A CABLE APR 6000 20192020 CBE K STD B CABLE APR 1000 20192020 CBE K STD A CABLE APR 4000 20192020 CBE L STD B CABLE APR 1000 20192020 CBE L STD A CABLE APR 890 20192020 CBE M STD B CABLE APR 2000 20192020 CBE M STD A CABLE APR 6000 20192020 CBE M STD B CABLE APR 12000 20182019 CBE M STD A CABLE APR 6000 20182019 CBE M STD B CABLE APR 12000 20182019 CBE M STD A CABLE APR 1000 20182019 CBE M STD B CABLE APR 3000 20182019 CBE M STD A CABLE APR 1738 20182019 CBE M STD B CABLE APR 3000 20182019 CBE M STD A CABLE APR 3940 20182019 CBE L STD B CABLE APR 1000 20182019 CBE K STD A CABLE APR 1000 20182019 CBE K STD B CABLE APR 1800 20182019 CBE K STD A CABLE APR 3000 20182019 CBE I STD B CABLE APR 1000 20182019 CBE I STD A CABLE APR 1000 20182019 CBE I STD B CABLE APR 2869 20182019 CBE I STD A CABLE APR 3000 20182019 CBE J STD B CABLE APR 1000 20182019 CBE J STD A CABLE APR 872 20182019 CBE J STD B CABLE APR 4000 20182019 CBE A STD A CABLE APR 2000 20182019 CBE A STD B CABLE APR 6000 20182019 CBE A STD A CABLE APR 12000 20182019 CBE A STD B CABLE APR 6000 20182019 CBE A STD A CABLE APR 12000 The measure i have used to filter <1000,
Qty<1000 = CALCULATE(COUNT('cab'[DEALER]),cab[QTY] <=1000)the result i get isMonth Count of Dealer Qty<1000April 13 21I have kept distinct count of dealerResults are wrong- srkase6 years agoHelper IV
In a month a dealer might have taken items in many invoices... The sum we should check and get the total and then the measures should be applied..
- v-chuncz-msft6 years agoCommunity Support
You may use the following measure.
Measure = COUNTROWS ( FILTER ( VALUES ( cab[DEALER] ), CALCULATE ( SUM ( cab[QTY] ) <= 1000 ) ) )