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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.