Forum Discussion

nmck86's avatar
nmck86
Post Patron
9 years ago
Solved

Dax Formula Help

Hi All,

 

I am working with a dataset similar to the one listed below and I am trying to create a DAX formula and have been using an IF formula and it was a formula that looked at the Proposal Type Column and said IF that field is "Internal Proposal" then pull back Investment Priority... However after that I tried to nest additional IF statements into that one that would say IF Investment Priority is "N/A", pull back Corporate Focus Area. Everytime it seems to only review the first logic and not the rest. I think I am doing the formula slightly wrong. Anyone have an idea of what formula I should use for this issue?

 

 

Request #Proposal TypeInvestment PriorityCorporate Focus AreaSelect Applicable Investment Priority
1LCDCommunity Impact  
2LCDEnvironmental  
3Internal ProposalN/AExecutive  
4Economic Mobility   
5Environmental   
6Community Impact   
7LCDN/A Environmental
8Internal Proposal Corporate 

 

  • Sean's avatar
    Sean
    9 years ago

    Can you elaborate why you think its ignoring the second half?

    Investment Priority Test =
    IF (
        'CyberGrants Data'[Proposal Type] = "Internal Proposal -Administrators Only",
        IF (
            'CyberGrants Data'[Select the applicable investment priority ] = BLANK (),
            'CyberGrants Data'[Corporate Focus Area],
            'CyberGrants Data'[Select the applicable investment priority ]
        ),
        IF (
            'CyberGrants Data'[Proposal Type] = "Local Community Development",
            'CyberGrants Data'[Investment Priority Category ],
            'CyberGrants Data'[Proposal Type]
        )
    )

    Seems to work fine

     

    Make sure you are checking for the correct column values - meaning the conditions are spelled as they are in the column

    "Internal Proposal " will not be found in the Proposal Type Column but "Internal Proposal" will be with no space at the end

6 Replies

    • nmck86's avatar
      nmck86
      Post Patron

      Investment Priority Test = IF('CyberGrants Data'[Proposal Type] = "Internal Proposal", 'CyberGrants Data'[Select the applicable investment priority ], IF('CyberGrants Data'[Select the applicable investment priority ] = Blank(), 'CyberGrants Data'[Corporate Focus Area]))

       

      This is something similar to what I have... However, when I was running it only select applicable investment priority would pull back.. none of the other conditions if that field is blank are working... I hope this helps...