Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Expert
I need month 1st date value each day, for good understanding please see the 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
I got this resolution which worked well when I use a simple date format like above but it's not working when I turn the date into Hierarchy. The resolution I got is below
1 Day Value =
VAR currentyear =
YEAR ( MAX ( Billing[Date2]) )
VAR currentmonth =
MONTH ( MAX ( Billing[Date2]) )
VAR currentmonthfirstday =
DATE ( currentyear, currentmonth, 1 )
RETURN
CALCULATE ( Billing[Billing], Billing[Date2] = currentmonthfirstday )
Solved! Go to Solution.
Hi Kim
Thanks for your help your solution of replacing All with Allslected worked thanks
Hi, @shanipowerbi
If you convert the context to the date-hierarchy, I think you need to add one more condition into the measure, because the context is changed.
Please try the below.
1 Day Value =
VAR currentyear =
YEAR ( MAX ( Billing[Date2]) )
VAR currentmonth =
MONTH ( MAX ( Billing[Date2]) )
VAR currentmonthfirstday =
DATE ( currentyear, currentmonth, 1 )
RETURN
CALCULATE ( Billing[Billing], Filter(ALL(Billing), Billing[Date2] = 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 Kim
Thanks for your help your solution of replacing All with Allslected worked thanks
Hi,
What do you mean by "when I turn the date into Hierarchy"? Show the result you are expecting.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
142 | |
77 | |
63 | |
51 | |
47 |
User | Count |
---|---|
214 | |
84 | |
61 | |
61 | |
60 |