Forum Discussion
Anonymous
7 years agoNot applicable
Lookupvalue using dates?
Hello, I am trying to divide a number in Table 1 by a number with the corresponding date in Table 2 to get a percentage. Table 1 Date Decimal 3/2/2019 0.9 3/2/2019 0.05 3/16/2...
- Anonymous7 years ago
Iamnvt wrote:
It looks like you are writing a Measure, not calculated column. I think you should turn off the date hierarchy to have [.Month] off.
You can go to Model tab, and insert calculated column with the said formula. Check my PBI file for more details.Just want to close the loop on the question and address the date hierarchy.
The date hierarchy has been off and still the .[Month] etc. comes up.
I ended up using:
Measure = Divide(sum('Table1'[Decimal]),calculate(sum('Table2'[Number])),0)which seems to work. TY
Ashish_Mathur
7 years agoSuper User
Hi,
This calculated column works just fine.
Column = [Decimal]/LOOKUPVALUE(Table2[Number],Table2[Date],Table1[Date])
Hope this helps.
- Anonymous7 years agoNot applicable
Ashish_Mathur wrote:Hi,
This calculated column works just fine.
Column = [Decimal]/LOOKUPVALUE(Table2[Number],Table2[Date],Table1[Date])
Hope this helps.
This doesn't work at all for me.
It says: "The value for 'Decimal' cannot be determined. Either 'Decimal' doesn't exist, or there is no current row for a column named 'Decimal'.
?? please let me know if you have any ideas.
- Ashish_Mathur7 years agoSuper User
Hi,
I cannot understand why it is not working. As can be seen in my screenshot, my formula works fine. I hope you are writing it as a calculated column formula (not as a measure).