Forum Discussion

abc_777's avatar
abc_777
Solution Specialist
3 years ago
Solved

hi

hi,

 

I have two measures

one for quantity count other for amount. 

 

measure1= sqty - rqty

measure2 = (sqty - rqty) * MRP

 

I need to create a new measure that with sum so  i can switch these two measures

 

I have tried it form modeling tab then parameter then field but its gives me data type Text i cant and make it sum

 

thanks

 

 

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi abc_777 ,

     

    According to your statement, I think you want to combine two measures by a slicer.

    Create a calculated table "MeausreName" for slicer.

    Measure Selection = {"Measure1","Measure2"} 

    Measure:

    Measure Combine = 
    SWITCH(SELECTEDVALUE('Measure Selection'[Value]),"Measure1",[Measure1],"Measure2",[Measure2])

    Result is as below.

    By Default:

    Select Measure1:

    Select Measure2:

     

    Best Regards,
    Rico Zhou

     

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

     

2 Replies

  • abc_777 , Have you checked the data type for all three columns and measure and ensured none is a text?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi abc_777 ,

     

    According to your statement, I think you want to combine two measures by a slicer.

    Create a calculated table "MeausreName" for slicer.

    Measure Selection = {"Measure1","Measure2"} 

    Measure:

    Measure Combine = 
    SWITCH(SELECTEDVALUE('Measure Selection'[Value]),"Measure1",[Measure1],"Measure2",[Measure2])

    Result is as below.

    By Default:

    Select Measure1:

    Select Measure2:

     

    Best Regards,
    Rico Zhou

     

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