Forum Discussion
dkrishnan
7 years agoFrequent Visitor
Card - count
Hi All Thanks in advance for the help. I am trying to create cards that shows number of customers that is meeting Sales Target as well count that is not meeting the target. See sample tab...
- 7 years ago
hi, dkrishnan
After my test, you could try this way:
measure = CALCULATE(SUM(Table1[Variance] ))
Result = VAR _table = SUMMARIZE ( Table1, Table1[Customer], "var", [measure] ) RETURN IF ( HASONEVALUE ( Table1[Product] ), CALCULATE ( COUNTA ( Table1[Customer] ), FILTER ( Table1, [measure] < 0 ) ), CALCULATE ( COUNTAX ( FILTER ( _table, [var] < 0 ), [Customer] ) ) )Result:
here is pbix file, please try it.
Best Regards,
Lin
v-lili6-msft
7 years agoCommunity Support
hi, dkrishnan
After my test, you could try this way:
measure = CALCULATE(SUM(Table1[Variance] ))
Result =
VAR _table =
SUMMARIZE ( Table1, Table1[Customer], "var", [measure] )
RETURN
IF (
HASONEVALUE ( Table1[Product] ),
CALCULATE ( COUNTA ( Table1[Customer] ), FILTER ( Table1, [measure] < 0 ) ),
CALCULATE ( COUNTAX ( FILTER ( _table, [var] < 0 ), [Customer] ) )
)
Result:
here is pbix file, please try it.
Best Regards,
Lin
dkrishnan
7 years agoFrequent Visitor
Hi Lin
Thank you so much. it worled.
appreciate the help.
regards
deven