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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Unable to format number of days between dates as anything other than date

This formla works fine in PowerPivot (and allows me to format as whole number), but in PowerBI, I am unable to format the measure as anything other than date.

 

This is on the Latest Update  2.50.4859.502 64-bi

 

Days Since Last Sale = IF(ISBLANK([Last Sale Date]),blank(),TODAY() - [Last Sale Date])

 

days_since_last_sale.png

 

 

Status: Accepted
Comments
CLEARIFY
Helper I
The way to work around this bug is to multiply by 1. This forces PowerBI to see it as a number.
v-haibl-msft
Microsoft Employee

@CLEARIFY

 

I can repro the same issue as you. I’ve reported it internally to Power BI Team: CRI 47086455
I’ll post here once I get any update about it.

 

Best Regards,
Herbert

Vicky_Song
Impactful Individual
Status changed to: Accepted
 
v-haibl-msft
Microsoft Employee

@CLEARIFY

 

I've got response from the Product Team.

 

Please change the DAX expression to DATEDIFF([Last Sale Date], TODAY(), DAY)

 

Best Regards,
Herbert