Forum Discussion
Anonymous
6 years agoNot applicable
If function not working
Hello all, I am new to Power BI and I am trying to write an IF function in a column. I have two different tables that I need to pull data from. THe column needs to display "If the catagory on...
- 6 years ago
Hi Anonymous
As Greg_Deckler Suggested..
you can try below formula..your col name=IF(HR[Category]="PBL",LOOKUPVALUE(Budget[Total Budgeted Base Salary],Budget[Combo Key],HR[Combo Key]),(HR[Annual Rate or max(Mid-Range Rate, Last Occupant Salary)]*HR[Funding Distribution]/100) )Hope it will solve your issue..Regards,snandy
Greg_Deckler
6 years agoCommunity Champion
Try wrapping Budget[Total Budgeted Base Salary] with a SUM or MAX or something. Looks like that is in a different table and perhaps no relationship?
Anonymous
6 years agoNot applicable
I tried wrapping it in a sum and it sums the entire column and gives this huge number, I just want it to return the value for one person not the sum of the whole column
- Greg_Deckler6 years agoCommunity Champion
Right, well, we know where the issue is. Well, if edhans is already investigating then you are in good hands. I expect he will get you a solution that involves LOOKUPVALUE, etc.
- AilleryO6 years agoMemorable Member
Hi,
Not so sure about your what your model is.
But I'm quite sure your solution is in this video :
https://www.sqlbi.com/tv/different-types-of-many-to-many-relationships-in-power-bi/
Hope it helps,