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

Help custom column

Hello,

I'd like to create a custom column in PowerBI with the below formula :

Trim_ContractDate = IF(DOSSIER_PA[Année_ContractDate]<>"","T" &""& FORMAT(DOSSIER_PA[Contract_Date],"Q","" ))

but it returns #error as you can see below.

DAX comparison operations do not support comparing Integer values with Text values. Use the VALUE or FORMAT function to convert one of the values.
I don't know how to fix it, any help will be appreciated.
Thanks
1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@FranckGbadamass  try this

Trim_ContractDate=
IF (
    DOSSIER_PA[Année_ContractDate] <> BLANK (),
    "T" & ""
        & FORMAT ( DOSSIER_PA[Contract_Date], "Q", "" )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@FranckGbadamass  try this

Trim_ContractDate=
IF (
    DOSSIER_PA[Année_ContractDate] <> BLANK (),
    "T" & ""
        & FORMAT ( DOSSIER_PA[Contract_Date], "Q", "" )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@amitchandak issue remains the same sir.

amitchandak
Super User
Super User

@FranckGbadamass , Try like

Trim_ContractDate = IF(DOSSIER_PA[Année_ContractDate]<>"","T" &""& FORMAT(DOSSIER_PA[Contract_Date],"Q"),"" )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.