Forum Discussion

stuartaff's avatar
stuartaff
Regular Visitor
5 years ago
Solved

Trying to divide

Hi All,

 

Hope you can help me.

 

Im trying to divide a total count of a column by the same column but filtered by a silcer. Hopefully the below will help

Im trying to count the data based on all the slicers execpt the liability decison splicer by the same data count but using the liability splicer.

 

I got the number in the Test 1 card by counting all of claims using all the slicers and then using the edit interactions to stop the liability slicer being used on it.

Test 2 is counting the claims using all slicers on the visual.

Ignore test 3

 

So what I need is:

a count of claims by a column called claim number using all the slicers except the slicer liability divided by the count of claims using all the slicers.

 

So 555/147 

 

I hope that is clear enough for some help

 

Thanks

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi stuartaff ,

     

    Try

    measure = 
    var a = calculate(count([value]),filter(all(table),column1=slicer1&&column2=slicer2&&...))
    var b = count(value)
    return
    a/b

     

    Best Regards,

    Jay

4 Replies

  • stuartaff , Try a measure like

    divide(calculate(count(Table[column]), removefilters(Table[liability])),count(Table[column]))

    • stuartaff's avatar
      stuartaff
      Regular Visitor

      amitchandak 

       

      Thank you for your reply

       

      I have used the measure and it is returning the value 1 (100%)

  • stuartaff's avatar
    stuartaff
    Regular Visitor

    Anyone else have a solution for the above

     

    I need to work out the opportunties.

     

    So take count all the data using all the slicers and the divide all the data exept/ignore the selction on the liability slicer.

     

    Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi stuartaff ,

     

    Try

    measure = 
    var a = calculate(count([value]),filter(all(table),column1=slicer1&&column2=slicer2&&...))
    var b = count(value)
    return
    a/b

     

    Best Regards,

    Jay