Forum Discussion

SamGibbs1's avatar
SamGibbs1
Frequent Visitor
7 years ago
Solved

Filtering lookup

Hi,   I am trying to look up values using DAX, but only where a text entry is = to something. I have the look up element working:   RTSG_Costs = LOOKUPVALUE(RTSGMatrix[RTSGAmount],RTSGMatrix[Awar...
  • Anonymous's avatar
    Anonymous
    7 years ago

    SamGibbs1,

    Firstly, please ensure that you use "New Column" option in Power BI Desktop to create calculated columns.


    Secondly, please split the above DAX formula into multiple formulas to better troubleshoot the issue.

    Col2=LOOKUPVALUE(RTSGMatrix[RTSGAmount],RTSGMatrix[Award],LOOKUPVALUE(StudentDetails[Award],StudentDetails[SITS_StudentNumber],StudentYearsActive[SITS_StudentNumber]),RTSGMatrix[AcademicYear],StudentYearsActive[AcademicYear])*StudentYearsActive[MonthDecimal]
    Col1=LOOKUPVALUE(RTSGMatrix[RTSGPaidLump_or_Annual],RTSGMatrix[Award],LOOKUPVALUE(StudentDetails[Award],StudentDetails[SITS_StudentNumber],StudentYearsActive[SITS_StudentNumber]))
    LastColumn = IF(TableName[Col1]="Annual",TableName[Col2],0)


    If you still get errors, please share sample data of your table and post expected result here following the guide in this thread:https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.

    Regards,
    Lydia