- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
null
null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Expected measure: =
VAR _newtable =
ADDCOLUMNS (
Data,
"@HC", CALCULATE ( SUM ( Data[Ending HC] ) ),
"@HCprevmonth",
CALCULATE (
SUM ( Data[Ending HC] ),
FILTER (
ALL ( Data ),
Data[Fiscal Month ID]
= EARLIER ( Data[Fiscal Month ID] ) - 1
)
)
)
VAR _monthcount =
COUNTROWS ( Data )
RETURN
DIVIDE ( SUMX ( _newtable, [@HC] + [@HCprevmonth] ), _monthcount * 2 )
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have an alternative to the earlier function as that does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please try the below, and check the attached file.
Expected measure V2: =
VAR _newtable =
ADDCOLUMNS (
Data,
"@HC", CALCULATE ( SUM ( Data[Ending HC] ) ),
"@HCprevmonth",
CALCULATE (
SUMX (
FILTER (
ALL ( Data ),
Data[Fiscal Month ID]
= MAX ( Data[Fiscal Month ID] ) - 1
),
Data[Ending HC]
)
)
)
VAR _monthcount =
COUNTROWS ( Data )
RETURN
DIVIDE ( SUMX ( _newtable, [@HC] + [@HCprevmonth] ), _monthcount * 2 )
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works in the pbix file but getting odd results in my measure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please share your sample pbix file's link.
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.
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
09-03-2024 09:04 AM | |||
12-20-2023 08:36 AM | |||
10-23-2024 04:02 AM | |||
12-24-2016 06:44 PM | |||
07-04-2024 05:04 AM |
User | Count |
---|---|
96 | |
71 | |
44 | |
38 | |
29 |
User | Count |
---|---|
156 | |
92 | |
61 | |
44 | |
42 |