Forum Discussion

FormworkFan's avatar
FormworkFan
Helper I
1 year ago
Solved

Calculate Function and Slicers

I have created a measure to provide sales from only 1 Key account.  These Key accounts in my data are all listed under my key accounts "National Accounts".
 
Key Account Sales = (CALCULATE([Total Sales],'All Divisions Table-RS'[Customer] = "CONSTRUCTION PRODUCTS INC (ST)"))
 
The measure works, but when I select another region on my slicer,like "South", the value comes up $0.00.
 
My understanding of the Calculate function was it works outside of Filter or slicers
 
Please provide any comments on this.
 
Thanks,
FWF
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi FormworkFan 

     

    Congratulations! It seems that you have gotten a solution. Could you please share your solution and mark it as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

     

    Best Regards    

    Zhengdong Xu

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

  •  

     

    So it was pretty basic. I only had to enter in the Filter Context that I wanted to inlcude in my measure.

     

    Key Account Sales = (CALCULATE([Total Sales],'All Divisions Table-RS'[Customer] = "CONSTRUCTION PRODUCTS INC (ST)") , Region[Region] = "Key Accounts")

     

    So that worked, however when I now try to add this measure to my Total Sales measure, i'm getting a circular dependency error. I'm trying to sort that part out now.

     

     

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi FormworkFan 

       

      Congratulations! It seems that you have gotten a solution. Could you please share your solution and mark it as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

       

      Best Regards    

      Zhengdong Xu

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

      • FormworkFan's avatar
        FormworkFan
        Helper I

         

         

        So it was pretty basic. I only had to enter in the Filter Context that I wanted to inlcude in my measure.

         

        Key Account Sales = (CALCULATE([Total Sales],'All Divisions Table-RS'[Customer] = "CONSTRUCTION PRODUCTS INC (ST)") , Region[Region] = "Key Accounts")

         

        So that worked, however when I now try to add this measure to my Total Sales measure, i'm getting a circular dependency error. I'm trying to sort that part out now.