Forum Discussion

arav007's avatar
arav007
Frequent Visitor
4 years ago
Solved

power Bi measure

I have 2 datecolumns G&H, have to write a measure -when H date> G date and H date falls within 12 months from now then value column have to show Region . and viceversa G H Value 06/07/2016 ...
  • v-zhangti's avatar
    4 years ago

    Hi, arav007 

     

    Please check the following methods.

    Value = 
    IF (
        OR ( [H] > [G], [H] IN DATESINPERIOD ( 'Date'[Date], TODAY (), 12, MONTH ) ),
        "region",
        "polls"
    )

     

    Measure:

    Value M = 
    IF (
        OR ( SELECTEDVALUE('Table'[H]) > SELECTEDVALUE('Table'[G]),
        SELECTEDVALUE('Table'[H]) IN DATESINPERIOD ( 'Date'[Date], TODAY (), 12, MONTH ) ),
        "region",
        "polls"
    )

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.