Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JoseArun
Regular Visitor

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.
 

 

JoseArun_0-1723844048033.png

 

 

 

JoseArun_1-1723844482381.png

JoseArun_0-1723844623246.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

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

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

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

Thank you . yes that was exactly the issue, I used as a measure and it worked.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors