Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Help with calculated column

Hello Community  -  I have an urgent need to try and solve this.  

 

In this matrix, the total count (filtered on a particular customer) is showing a count of 1 and  1  for both of the columns here.   It should actuall say  1   and    0.     In this case, this particular customer had only 1 revenue order in the last 12 months, but this visual is also showing a 1 in the other column.  

 

How can I solve this?  Is there a way to modify this in the calculated column to correct show the count of customers that show up in each column?   For example, in this case it should be showing a  1   and    0 .   The other field in the visual is the customer from our customers table. 

 

 

2 Replies

  • DataZoe's avatar
    DataZoe
    Microsoft Employee

    Anonymous I suspect changing your calculated column to include a calculate around the [Rolling 12 Month Sales] may solve this issue.  Assuming this is in your table with one row per customer. 

     

    Last 12 Month Orders =
    IF (
    CALCULATE ( [Rolling 12 Month Sales] ) > 0,
    "Has Revenue Order in Last 12 Months",
    "Has Zero Value Orders in Last 12 Months"
    )

     

    Another approach may also be to create two measures:

     

    Customers with Revenue Order in Last 12 Months =
    CALCULATE (
    [Customers],
    FILTER ( CustomerTable, [Rolling 12 Month Sales] > 0 )
    )

     

    Customers with Zero Value Orders in Last 12 Months =
    CALCULATE (
    [Customers],
    FILTER ( CustomerTable, [Rolling 12 Month Sales] = 0 )
    )

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi,  Anonymous 

     

    Have you tried the method  su DataZoe  provided? Is it solved?

    If problem still persists, please upload some insensitive data samples and expected output.

     

    Best Regards,
    Community Support Team _ Janey