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
Anonymous
Not applicable

date Measure error

Hi Experts

 

Cannot see the error in the following measire 

days = IF( DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) < 30,1, IF( DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) >0 && <=30,2,3)))

1 ACCEPTED SOLUTION
jppv20
Solution Sage
Solution Sage

Hi @Anonymous ,

 

Try this:

days = IF( DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) < 30,1, IF( DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) >0 && DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) <=30,2,3))
 
If I answered your question, please mark it as a solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
jppv20
Solution Sage
Solution Sage

@Anonymous 

Can you give some example data from your table(s)?

jppv20
Solution Sage
Solution Sage

Hi @Anonymous ,

 

Try this:

days = IF( DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) < 30,1, IF( DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) >0 && DATEDIFF(SELECTEDVALUE('Table'[Ticket date]),TODAY(), DAY) <=30,2,3))
 
If I answered your question, please mark it as a solution to help other members find it more quickly.

Anonymous
Not applicable

jppv20, hw would you write the above with out selected value and as a calculated column?

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.