Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dkrishnan
Frequent 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 table below which detailed customer by product with the sales, target and the variance between them.

 

CustomerProductSalesTargetVariance
Customer APROD A $        100 $          50 $          50
Customer BPROD A $        200 $        300-$       100
Customer CPROD A $        350 $        320 $          30
Customer DPROD A $        500 $        400 $        100
Customer EPROD A $        200 $        350-$       150
Customer FPROD A $        400 $        450-$          50
Customer APROD B $        100 $        150-$          50
Customer BPROD B $        400 $        300 $        100
Customer CPROD B $        350 $        320 $          30
Customer DPROD B $        300 $        400-$       100
Customer EPROD B $        360 $        350 $          10
Customer FPROD B $        500 $        450 $          50

Now:-

(a) I have one customer that is not meeting sales target overall

(b) I have 3 customers that is not meeting target for PROD A

(c) I have  customers that is not meeting target for PROD B

 

I have slicers of Customer and Product

 

How do i dynamically display cards that shows the count of customers that is not meeting target.sales.PNG

 

I tried creating additional tables which shows the distinctcount by customers only where variance is less than 0. This didn't work when i add product as part of my slicer. If i include product in the additional table, the count will be off.

 

is there a way to achieve this as i am in the midst of miragting from Oracle BDD. BDD has a feature that shows summarization bar which show dimension values that exceed a threshold.

 

Any help is much appreaciated.

 

regards

deven

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community 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:

8.JPG9.JPG10.JPG

 

here is pbix file, please try it.

 

Best Regards,

Lin

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community 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:

8.JPG9.JPG10.JPG

 

here is pbix file, please try it.

 

Best Regards,

Lin

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lin

 

Thank you so much. it worled.

 

appreciate the help.

 

regards

deven

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.