Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Expressions that yield variant data-type cannot be used (multiply with constant value)

Hello,   Could you help with DAX for below situation. IF(OR(All_Data_View[supplier_name]="ABC",All_Data_View[supplier_name]="XYZ"), SUMX(All_Data_View,All_Data_View[part_qty])*(12))   Where 12...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Anonymous 

    Make sure the datatypes are setup correctly in the power query editor. (QTY as wholenumber)

    With your test data the following measure worked for me:

    Column =
    IF (
        All_Data_View[Shipping Site] = "XYZ",
        All_Data_View[Part Qty] * 15.2,
        IF (
            All_Data_View[Shipping Site] = "ABC"
                && All_Data_View[Part Qty] < 100,
            All_Data_View[Part Qty] * 10,
            50
        )
    )

     

    Kind regards
    Joren Venema

    Data & Analytics Consultant
    If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.