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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mdebekker
New Member

Compare 2 dates, 1 from SP List created (upload date) and 1 from Excel file (Due Date)

I have a data source from a Sharepoint Library which contains the upload date from a file (created) which I want to compare with the Due date of uploading a file from an Excel table. I want to have a conditional formatting set when the date of upload is past the Due date. Searching here in the community didn't help. Hopefully with this new thread someone can help me.

 

Dates.JPG

Data model.JPG

  

5 REPLIES 5
mdebekker
New Member

It seems that the brackets were incorrect and now this part has been solved: 

 

On Time = If(max('Monthly Project Reports (Active)'[Created]) < MAX(DUE_DATES_BPO[Due date]),"1","2")
 
Still have some ongoing questions on how to set a number 3 when dates are the same. the other question is when using the numbers they are set as "text" format which I can't change as it's greyed out
 
Format MEasure to Number.JPG

HI @mdebekker,

You can try to remove the quotation that you set in your if statement results, then save changes and click on the measure field to reactivate it to confirm if these formatting fields activated.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@mdebekker , You can create a color meausre like

 

if(max(table[upload date]) <max(Table[Due date]) , "green", "red") and use that is conditional formatting with field value option

Thanks for your reply, I entered the code: 


 

Status = IF(MAX('Monthly Project Reports (Active)'[Created] <MAX(DUE_DATES_BPO[Due date], "green", "red")))

I get the following error on that;

 

Too many arguments were passed to the MAX function. The maximum argument count for the function is 2.


HI @mdebekker,

How did your table record mappings? One : many? 
If the fact table keys have multiple corresponding date values stored in two tables, it is hard to mapping and compared, you need to do summaries with them first.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.