Forum Discussion
Expressions that yield variant data-type cannot be used (multiply with constant value)
Hello,
Could you help with DAX for below situation.
- Anonymous6 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.
7 Replies
- AnonymousNot applicable
Anonymous
If this is a measure this is not gonna work regardless. The IF statement is not iterating the table and you should use a filter.
From what I can tell this code should result in the same output:
Measure = CALCULATE ( SUM ( All_Data_View[part_qty] ) * 12, All_Data_View[supplier_name] = "ABC" || All_Data_View[supplier_name] = "XYZ" )Hope this helps.
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.- AnonymousNot applicable
Hi,
Thanks for your reply!
I am trying to calculate transaction fee in single new column using "nested if" for set of data value, and this among one condition.
If there any other way to get this condition worked along with others in same column.
Regards,
CS
- amitchandakSuper User
Can you share sample data and sample output. Mark me @