Forum Discussion
If function on dataset
- Anonymous3 years ago
rpinxt ,
If the two tables are related to each other this will work.Measure =Var a = MAX(Sheet1[Flow]) = "Reworked"var b = MAX(Sheet1[Amt LC]) < -50var c = a && bvar d = IF(c,MAX('Sheet1 (2)'[Quantity]), 0)return dRegards,
Ashfiya
--------------------------------------------------------------------------------------------------------------------------
Did I help you today? Please mark my post as a solution and hit the Kudos button.
Anonymous thanks this is apparently working:
Now I have only output for the Flow Reworked.
Still have to study the code to grasp why the (excel) vlookup is done with Max but it is working.
Those 2 tables are linked together with 'FlowKey'.
Above you see this key. This is present in both tables.
Thanks for the help!
Anonymous aiii I spoke to soon....
I put in some more detail and now it is not working anymore.
I had put in example on a higher level to make it better readable.
But now I only put in 1 extra field :
As you see the yellow lines are ok as the amount is less then -50
But the red line it is -42 which is more then -50 so that should not be 0
**EDIT**: ohhh never mind...complete losing the overview here....
Its -42.000 which clearly is more than -50....😖
Will experiment so more.
Maybe I do have to do a calculated colum as I notice it is really laggy because it needs to calculate each row.
Not sure if that will work with fields from 2 tables.
Maybe have to do a union if that is possible.....
Lots to experiment 🤣
- Anonymous3 years agoNot applicable
rpinxt ,
Correct me if I am wrong, your condition isIF
flow = Reworked AND Amt LC > -50
result = Show Quantity ValueElse
result = 0 (false )
- rpinxt3 years agoSolution Sage
I was able to solve my problem 😁
I merged the source with the excel file based on 'FlowKey'.
Now I had everything in 1 table. Then with calculated columns it was easy(er) to get the amounts that I wanted.
Thanks for your help