Forum Discussion

hasharma19's avatar
hasharma19
Helper II
3 years ago
Solved

MaxDate Issue Calculated Column

Hell All,

I have dimdate table in my power bi structure which date calculated on basis of other table min and max date column.

Now I am trying to get the Max data using calculated column with expression as" DimDate[Date]<=MAX(Delivery_Exce[ERDF NC Date])", but it is always giving me true as output instead of true and false whereever the condition is not matching.

Please help me to get the correct calculation.

 

 

 

 

 

12 Replies

  • could you share your pbix-file? Or create an example file which reproduces your issue?

    • hasharma19's avatar
      hasharma19
      Helper II

      Ahmedx Ahmedx Hi,

      Since there is no option available/showing to attached the file.

      i have created a table for ref. I have raw data file wherein three dates columns are available(dates are from 01/01/2021 to 20/05/2023).
      I have creaated new date table -Calender[min(Raw_dataERDF_NC_Date),max(Raw_dataERDF_NC_Date)

      Now have added calculated column in dimdate table as MaxDate- DimDate[Date]<=MAX(Raw_data[ERDF_NC_Date]). 

      The output of max date is showing all value is true, whereas is should true for matched and false for unmatched as per DAX.

       

       

      Raw_Data   
      SidStartdateEDRF_NC_DateEDRF_SC_Date
      111111101-01-202103-01-202106-01-2021
      111111202-01-202104-01-202107-01-2021
      111111303-01-202105-01-202108-01-2021
      111111404-01-202106-01-202109-01-2021
      111111501-01-202203-01-202206-01-2022
      111111602-01-202204-01-202207-01-2022
      111111703-01-202205-01-202208-01-2022
      111111804-01-202206-01-202209-01-2022
      111111901-01-202303-01-202306-01-2023
      111112002-01-202304-01-202307-01-2023
      111112103-01-202305-01-202308-01-2023
      111112204-01-202306-01-202309-01-2023
      • Ahmedx's avatar
        Ahmedx
        Super User

        you can upload the file to any cloud!

        Do you have an established relationship between the date table and Raw_data?