Forum Discussion

JoseArun's avatar
JoseArun
Regular Visitor
2 years ago
Solved

DateDiff Not working

Hi All,

 

I am relativly new to PowerBI and getting my way around slowly. I am in to an issue and I don't know , I am doing something silly here.

 

I have this Sales View, all I need to do is, I need to call out, if the diff field is greater than 3000, I want to display a message in an adjusent field that "High Yeild Sales". The minute I add the thje field , the whole of the display becoming blank.

 
SumRev = sum(sales[revenue])
PreviousYear = CALCULATE(sum(sales[revenue]),DATEADD('Date Dimension'[order_date],-1,YEAR))
diff = [SumRev]-[PreviousYear]
diffAction = if(    [SumRev] -[PreviousYear] > 3000, "High Yeild","No action") -- This is not working, as soon as i add to visual its getting blank out.
 

 

 

 

 

 

  • diffAction needs to be a measure, not a calculated column.

2 Replies

  • diffAction needs to be a measure, not a calculated column.

    • JoseArun's avatar
      JoseArun
      Regular Visitor
      Thank you . yes that was exactly the issue, I used as a measure and it worked.