Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi there ;
i need your help for below issue ;
i have two table , Table A and Table as below , for both table i have order no , i would like to make lookup value for net price to Table B , but there will be rule like that ;
the net price which will transfer to Table B , will be the net price of the last date's net price always
Solved! Go to Solution.
please try to create a column in table B
NET PRICE =
VAR _MAXDATE = MAXX(FILTER('Table A','Table A'[order no]='Table B'[order no]),'Table A'[document date])
RETURN MAXX(FILTER('Table A','Table A'[order no]='Table B'[order no] && 'Table A'[document date]=_MAXDATE),'Table A'[net price])
Proud to be a Super User!
SUMMARIZE(
TableA,
TableA[OrderNo],
"LastPrice",LASTNONBLANKVALUE(TableA[DocumentDate],SUM(TableA[NetPrice]))
)
@visakhmurukes Interesting differences in the produced queries
versus
Your version has many more row scans but still comes out better as it avoids the CallbackDataID issue in my version.
thanks for info @lbendlin but this explaning so technical 🙂 i could not understand sorry , i am not responsible for IT 🙂 , so do you advice me anything else ?
Use whatever solution you are comfortable with . My comment wasn't directed at you but at the person who (in my opinion) gave you the best solution.
thank you very much dear @lbendlin , for your helps and supports , nice to meet you , i will add you to my friends
please try to create a column in table B
NET PRICE =
VAR _MAXDATE = MAXX(FILTER('Table A','Table A'[order no]='Table B'[order no]),'Table A'[document date])
RETURN MAXX(FILTER('Table A','Table A'[order no]='Table B'[order no] && 'Table A'[document date]=_MAXDATE),'Table A'[net price])
Proud to be a Super User!
Here is a version that also gets the Totals right.
Hi,
You may download my PBI file from here.
Hope this helps.
Here would be a simple measure that does that.
Note that the totals are wrong. Is that important for you?
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |