Forum Discussion

ljimenezvega84's avatar
10 months ago
Solved

Double filter formula

Hello, i´ve have a dataset just like this below. i just created a formula to optain the Ammount by GL Account (

revenue = CALCULATE( SUM(Ammount), FILTER(table', 'GL Account= "1010")). Its possible to add ahother filter and obtain GL Account and Type  (need to obtain Actual revenue, Plan revenue, etc).
 
Thanks

 

GL AccountTypeCost CenterMonthAmmount
1010Actualxxx01/202510.000
1020Planxxx01/202520.000
1010Past yearxxx01/202530.000
1020Actualxxx01/202540.000
  • Hi ljimenezvega84,

     

    Yes, you can able to add multiple filters in the CALCULATE DAX function. Refer syntax: CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])

    revenue plan = CALCULATE( SUM(Ammount), FILTER(table', 'GL Account= "1010"), FILTER(table', 'Type= "Plan"))
    revenue actual = CALCULATE( SUM(Ammount), FILTER(table', 'GL Account= "1010"), FILTER(table', 'Type= "Actual"))

    Thanks,
    If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

1 Reply

  • Hi ljimenezvega84,

     

    Yes, you can able to add multiple filters in the CALCULATE DAX function. Refer syntax: CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])

    revenue plan = CALCULATE( SUM(Ammount), FILTER(table', 'GL Account= "1010"), FILTER(table', 'Type= "Plan"))
    revenue actual = CALCULATE( SUM(Ammount), FILTER(table', 'GL Account= "1010"), FILTER(table', 'Type= "Actual"))

    Thanks,
    If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.