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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
AlessandroBet
Resolver I
Resolver I

Day of week\month\quarter\year

Hi,

i have to calculate with power query starting from the current day (= Table.TransformColumns(Today,{{"Today", Date.Day, Int64.Type}})) how many days left to the current week\month\quarter\year

 

Any suggestion?

Ale

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @AlessandroBet 

According to your description, you want to get the days left of the now and the end of the week/month/quarter/year.

Here are the steps you can refer to :
(1)We can first add a current date as a table:

vyueyunzhmsft_0-1676256094414.png

(2)Then we can click "Custom Column" in "Add Column" in Power Query Editor:

vyueyunzhmsft_1-1676256131597.png

(3)Then we can add four columns like this:

vyueyunzhmsft_2-1676256156015.png

Duration.Days(Date.EndOfWeek([Column1],Day.Monday)-[Column1])
Duration.Days( Date.EndOfMonth([Column1])-[Column1])
Duration.Days( Date.EndOfQuarter([Column1])-[Column1])
Duration.Days( Date.EndOfYear([Column1])-[Column1])

Then we can meet your need , the result is as follows:

vyueyunzhmsft_3-1676256212703.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

3 REPLIES 3
belloibro
New Member

hello everyone , i need someone to help me with a dashbord that is showing how many presentations was done in a day,week,month,quarter and a year with power bi

Hi,

Share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yueyunzh-msft
Community Support
Community Support

Hi , @AlessandroBet 

According to your description, you want to get the days left of the now and the end of the week/month/quarter/year.

Here are the steps you can refer to :
(1)We can first add a current date as a table:

vyueyunzhmsft_0-1676256094414.png

(2)Then we can click "Custom Column" in "Add Column" in Power Query Editor:

vyueyunzhmsft_1-1676256131597.png

(3)Then we can add four columns like this:

vyueyunzhmsft_2-1676256156015.png

Duration.Days(Date.EndOfWeek([Column1],Day.Monday)-[Column1])
Duration.Days( Date.EndOfMonth([Column1])-[Column1])
Duration.Days( Date.EndOfQuarter([Column1])-[Column1])
Duration.Days( Date.EndOfYear([Column1])-[Column1])

Then we can meet your need , the result is as follows:

vyueyunzhmsft_3-1676256212703.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.