Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

ALL () function not working as expected

Hi,

 

I've tried searching but couldn't find the solution

 

I have a calculated measure calculating refund % sales in table 1. In table 2 I have an IND for a category (1 or 0).

% measure = calculate(table1[refund value]) / calulate(table1(sale value), all(table2[IND])

 

I have a bookmark on the report page applying a page filter to turn the IND column to 1, however when I do this my % sales measure is applying the IND measure so giving me infinity for most of my values. I wouldn't expect the IND measure to be applied because of the ALL function. 

 

Help please! 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Nevermind, 

     

    I've solved it. 

     

    I had a seperate IS NOT filter from table2[unrelated_col2] filtering on the report page. I've no idea why this affected my % sales measure because the sum(table1[sales value]) will always comply with the IS NOT filter on the page but it was...

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Nevermind, 

     

    I've solved it. 

     

    I had a seperate IS NOT filter from table2[unrelated_col2] filtering on the report page. I've no idea why this affected my % sales measure because the sum(table1[sales value]) will always comply with the IS NOT filter on the page but it was...

     

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi Anonymous 

     

    Try ALL( table2 ) instead 

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn