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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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"),"" )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.