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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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