Forum Discussion

dtango9's avatar
dtango9
Helper II
6 years ago
Solved

Help with DAX Statement

Hi,

I'm new to Power BI and am hoping someone can help.  I'm looking to create a statement with the following criteria:


- Condition 1 = "Type A"  AND  Condition 2 = "Type B"

- Date Field # 1 = In the past

- Date Field # 2 = Today and in the future

 

Any help is greatly appreciated ğŸ™‚

  • dtango9 

     

    Try something similar to this

     

    Trial Offer =
    IF (
        ( new_contract[subscription_type] = "Contract"
            || new_contract[new_dear] = "OFFER" )
            && (
                new_contract[subscriptioncancellationreason]
                    <= TODAY ()
                    && new_contract[new_enddate]
                        >= TODAY ()
            ),
        "Yes",
        "No"
    )

     

    Without seeing your data model it is difficult to tell you the exact DAX. Please modify it based on your requirement.

     



    Did I answer your question? Mark my post as a solution!
    Appreciate with a kudos
    🙂

6 Replies

    • dtango9's avatar
      dtango9
      Helper II

      Thanks!   Here are my sample tables - I'm still not getting it to work.

       

      • new_contract[subscription_type] = "Contract" AND new_contract[new_deal] = "OFFER"
      • new_contract[new_subscriptioncancellationreason] is expired
      • new_contract[new_enddate] is today or in the future
      • nandukrishnavs's avatar
        nandukrishnavs
        Community Champion

        dtango9  please provide a sample table and expected output. Are you trying to create a calculated column or measure?