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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
Anonymous
Not applicable

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

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

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

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.


Anonymous
Not applicable

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.