Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi Expert
I need month 1st date value each day, for good understanding please see example below:
Date Amount 1st Date Amount (required this)
01 Jan 2020 80,225 80,225
02 Jan 2020 80,400 80,225
03 Jan 2020 80,500 80,225
04 Jan 2020 80,800 80,225
04 Jan 2020 80,900 80,225
Solved! Go to Solution.
Hi, @shanipowerbi
Please try the below measure.
sales first day of month =
VAR currentyear =
YEAR ( MAX ( Sales[Date] ) )
VAR currentmonth =
MONTH ( MAX ( Sales[Date] ) )
VAR currentmonthfirstday =
DATE ( currentyear, currentmonth, 1 )
RETURN
CALCULATE ( Sales[sales], Sales[Date] = currentmonthfirstday )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @shanipowerbi
I am not sure how you changed the context, but if it is OK with you, please share your sample pbix file's link, then I can try to look into it to come up with a more accurate measure.
Thank you.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
please share your sample pbix file's link, then I can try to look into it.
Thank you.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @shanipowerbi
Please try the below measure.
sales first day of month =
VAR currentyear =
YEAR ( MAX ( Sales[Date] ) )
VAR currentmonth =
MONTH ( MAX ( Sales[Date] ) )
VAR currentmonthfirstday =
DATE ( currentyear, currentmonth, 1 )
RETURN
CALCULATE ( Sales[sales], Sales[Date] = currentmonthfirstday )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thanks, it worked, but it's not working when I turn the date in to Hierarchy
Hi,
I just posted a reply to your other post.
Please try the below.
sales first day of month =
VAR currentyear =
YEAR ( MAX ( Sales[Date] ) )
VAR currentmonth =
MONTH ( MAX ( Sales[Date] ) )
VAR currentmonthfirstday =
DATE ( currentyear, currentmonth, 1 )
RETURN
CALCULATE ( Sales[sales], filter (all (Sales), Sales[Date] = currentmonthfirstday ))
If you change the context from date to date-hierarchy, I think one more condition needs to be added to the measure.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi Kim
Thanks for the help, applied your suggested formula its working but not giving 1st day value
I used this
Hi,
please share your sample pbix file's link, then I can try to look into it.
Thank you.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @shanipowerbi
I am not sure how you changed the context, but if it is OK with you, please share your sample pbix file's link, then I can try to look into it to come up with a more accurate measure.
Thank you.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@shanipowerbi , with help from date table
calculate(sum(Table[Amount]), datesmtd(Date[Date]), filter(Date, Date[Date] = eomonth(Date[Date],0)+1))
or
calculate(sum(Table[Amount]), filter(allselected(Table), Table[Date] = eomonth(Table[Date],0)+1))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |