Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Filters on a measure won't work

Hello!

 

I am trying to sum up the net adjustments for a certain type of item using a filter.

This is my measure

 

Halloween Net adj = calculate(sum('All counts'[cost+])+sum('All counts'[cost-]),FILTER('All Expected','All Expected'[Total Halloween sku's counted]))
 
I have also tried this one as I already have a measure to sum up the net adj
 
Halloween net adj 2 = CALCULATE('All counts'[Net adj],FILTER('All Expected','All Expected'[Total Halloween sku's counted]))
 
However both simply bring back the total net adjustments for all the items. Other filters I have used are working i.e the total Halloween counted measure  
Total Halloween sku's counted =
CALCULATE([Total Halloween sku's], 'All Expected'[Counted] IN { 1 })
 
..works fine, which is why I thought I could use it in the Net adjustment measure.
 
I've checked the connections in the model which seem correct. Below is the model, I did try a direct link between the 'all counts' and 'all expected' tables which didn't work hence the inactive link there.
I have also changed the directtons of the link from stores to the other tables, and it breaks my table completly.
 

This is the table which should be giving me the adjustmentts just for Halloween

 

The net adj for S04 for example should only be around £32

 

I know it'll be something really simple as it always is, could you please help me figure it out?

 

thanks as always

 

bailey14

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Henry

     

    Unfortunately it doesn't pick up the column in the table, but I've just used a filter on the page instead which seems to work correctly

     

    Thanks for taking the time to reply!

     

    Kind Regards

    Claire

3 Replies

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,


    It seems that the filtering result in the formula is causing the problem. If you only want to keep the filter results for a particular column, you should try the following formula.

    M1 =
    CALCULATE (
        SUM ( 'Table'[Column1] ) + SUM ( 'Table'[Column2] ),
        ALLEXCEPT ( 'All Expected', All Expected'[Total Halloween sku's counted])
    )


    If the problem persists, can you provide me with test data (remove sensitive information) for further testing? Look forward to your feedback.


    Best Regards,
    Henry


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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Henry

       

      Unfortunately it doesn't pick up the column in the table, but I've just used a filter on the page instead which seems to work correctly

       

      Thanks for taking the time to reply!

       

      Kind Regards

      Claire

      • v-henryk-mstf's avatar
        v-henryk-mstf
        Icon for Community Support rankCommunity Support

        Hi Anonymous ,

         

        Feel free to give your feedback.🙂


        If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. 


        Best Regards,
        Henry