Forum Discussion

bhaskarpbi999's avatar
1 year ago
Solved

DAX Calculation for Measure with multiple filter conditions

Hi,

 

I have a measure Rev CY (Revenue Current Year) which is defined using below formuls.

 

Rev CY = CALCULATE([RevRaw],MthCal[DateVisCY] = TRUE()

 

I need help to write formula to get Revenue for Current year with condition as Services="STD" and Delitype="Resi" and the columsn are highlighted in yellow of below screenshot.

 

 

The requirement is now we have all data for customers in above visual need so that percentage can be calculated  like below 

 

Rev CY data customer wise liek /Rev CY for STD and Resi (formula needed)

 

Could you please assist me thanks for your support.  I am always available to provide additional details if needed.

 

 

Regards,

Bhaskar

 

 

 

 

  • bhaskarpbi999's avatar
    bhaskarpbi999
    1 year ago

    Hi Gautam,

     

    Thanks for your support.

    I have tried the above formula getting below error.

     

    Error - The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

     

     

     

     

     

    Regards,

    Bhaskar

     

  • bhaskarpbi999's avatar
    bhaskarpbi999
    1 year ago

    Hi Gautam,

     

    Kudos for your great support and it works now with below formula

     

    Rev CY STD Resi =
    CALCULATE(
    [RevRaw],
    MthCal[DateVisCY] = TRUE(),
    MktServ[CombServCd] = "STD",
    DeliType[DeliType] = "Resi")
     
    I am accepting it as as solution . Many thanks/

5 Replies

    • bhaskarpbi999's avatar
      bhaskarpbi999
      Helper V

      Hi Gautam,

       

      Thanks for your support.

      I have tried the above formula getting below error.

       

      Error - The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

       

       

       

       

       

      Regards,

      Bhaskar

       

      • ajohnso2's avatar
        ajohnso2
        Solution Supplier

        You have taken bhanu_gautam suggestion at face value without checking it. You didnt provide the table names for Services or Delitype, you need to fully qualify these.

        For example 'TableName'[Services] / 'TableName'[Delitype]