Forum Discussion

timward10's avatar
timward10
Helper II
1 year ago
Solved

DAX comparison operations do not support comparing values of type Date with values of type Text

Hi, 

 

Can someone help me with correcting the below formula in PBI or what I need to do to correct the columns please. 

 

= if(and([Product Name]="Optilite Special Protein Analyser",[Optilite Analyser Revenue Date]="January 2025"),[Split],if([Revenue Start Date]="January 2025",'Opps+Products - Revenue Probability'[Split],blank()))
 
Thanks
  • Hi timward10 - can you please check the attached pbix  and formaule attached FYR:

     

    Column =
    IF (
        AND (
            [Product Name] = "Optilite Special Protein Analyser",
            FORMAT([Optilite Analyser Revenue Date], "MMMM YYYY") = "January 2025"
        ),
        [Split],
        IF (
            FORMAT([Revenue Start Date], "MMMM YYYY") = "January 2025",
            RELATED('Revrel'[Split]),
            BLANK()
        )
    )
     
    Hope it helps.
  • timward10's avatar
    timward10
    1 year ago

    Got it working using your above formula, I just removed  RELATED('Revrel'[Split]), as split was already in my data set. All working now! Thank you 

2 Replies

  • Hi timward10 - can you please check the attached pbix  and formaule attached FYR:

     

    Column =
    IF (
        AND (
            [Product Name] = "Optilite Special Protein Analyser",
            FORMAT([Optilite Analyser Revenue Date], "MMMM YYYY") = "January 2025"
        ),
        [Split],
        IF (
            FORMAT([Revenue Start Date], "MMMM YYYY") = "January 2025",
            RELATED('Revrel'[Split]),
            BLANK()
        )
    )
     
    Hope it helps.
    • timward10's avatar
      timward10
      Helper II

      Got it working using your above formula, I just removed  RELATED('Revrel'[Split]), as split was already in my data set. All working now! Thank you