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.
Date. Type. Name. Product Value
Solved! Go to Solution.
Hi @M_SBS_6
For your question, here is the method I provided:
Here's some dummy data
“Table”
Create a new column, [YearMonth], containing the year and month.
YearMonth = FORMAT('Table'[Date], "YYYY-MM")
Create a measure to extract the last date of each month.
LastDateOfMonth =
CALCULATE(
MAX('Table'[Date]),
ALLEXCEPT('Table', 'Table'[YearMonth])
)
Create two measures to calculate the totals of "Nike" and "Macron" respectively.
Nike TotalValueAtMonthEnd =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] = 'Table'[LastDateOfMonth]
&&
CONTAINSSTRING('Table'[Name], "Nike")
)
)
Macron TotalValueAtMonthEnd =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] = 'Table'[LastDateOfMonth]
&&
CONTAINSSTRING('Table'[Name], "Macron")
)
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @M_SBS_6
For your question, here is the method I provided:
Here's some dummy data
“Table”
Create a new column, [YearMonth], containing the year and month.
YearMonth = FORMAT('Table'[Date], "YYYY-MM")
Create a measure to extract the last date of each month.
LastDateOfMonth =
CALCULATE(
MAX('Table'[Date]),
ALLEXCEPT('Table', 'Table'[YearMonth])
)
Create two measures to calculate the totals of "Nike" and "Macron" respectively.
Nike TotalValueAtMonthEnd =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] = 'Table'[LastDateOfMonth]
&&
CONTAINSSTRING('Table'[Name], "Nike")
)
)
Macron TotalValueAtMonthEnd =
CALCULATE(
SUM('Table'[Value]),
FILTER(
'Table',
'Table'[Date] = 'Table'[LastDateOfMonth]
&&
CONTAINSSTRING('Table'[Name], "Macron")
)
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I am happy to help but please provide data as table that we can import.
I dont want to faff reformatting your text data. Thank you
You can do this using the table icon
or better still save the data with read access on Onedrive, Dropbox or Google and post the url link here
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 | |
76 | |
63 | |
51 | |
47 |
User | Count |
---|---|
211 | |
82 | |
61 | |
61 | |
60 |