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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
gerdtf84
Frequent Visitor

How to reference the earliest date from transaction table in my rolling calendar query in M?

Hello,

 

I have my rolling calendar table as a lookup, using a static start value.

 

Instead I rather use the earliest date from my transaction table, so when I build a date slice it fits perfectly.

 

How can I do that?

 

Thanks

1 ACCEPTED SOLUTION
Arul
Super User
Super User

Hi @gerdtf84 ,

I hope that you need minimum date from transaction table. If I understood your problem correctly, then you try this,

 

List.Min(Table.Column(#"Transaction Table", "Date column" ))

 

 

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

2 REPLIES 2
gerdtf84
Frequent Visitor

Hello Arul,

 

thank you for your help. That was exactly what I was looking for.
I tried to integrate step by step and I can retrieve the correct date. But I do not manage to integrate it into my rolling calendar.

this is what I have so far:

 

startDate = List.Min(Table.Column(#"Sales", "Date" )),
#"Create List Of Dates" = List.Dates(Number.From(DateTime.LocalNow())-Number.From({{startDate}}),#duration(1,0,0,0)),
#"Converted to Table" = Table.FromList(#"Create List Of Dates", Splitter.SplitByNothing(), null, null, ExtraValues.Error),

 

But I am getting an error cause it seem I am getting a List instead of a Date value. Can you give me a hand here as well?

 

Thanks a lot for your help.

Arul
Super User
Super User

Hi @gerdtf84 ,

I hope that you need minimum date from transaction table. If I understood your problem correctly, then you try this,

 

List.Min(Table.Column(#"Transaction Table", "Date column" ))

 

 

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.