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 everyone, I'm trying to sum the last 5 rows in a table for each row and divided by category, such as the example below that I did in Excel. The expected result is the column D 'RUNNING_SUM'.
If I would write this in SQL, I would use SUM OVER PARTITION.
Could you anwser that for me?
.
Solved! Go to Solution.
try like:
Coulmn =
VAR _fam = [Fam]
VAR _year = [YEAR]
RETURN
SUMX(
FILTER(
TableName,
TableName[Fam] = _fam
&&TableName[Year] >=_year-4
&&TableName[Year]<=_year
),
TableName[Value]
)
Hi @FreemanZ , I edited the post, but the expected result is the Column D 'RUNNING_SUM'.
try like:
Coulmn =
VAR _fam = [Fam]
VAR _year = [YEAR]
RETURN
SUMX(
FILTER(
TableName,
TableName[Fam] = _fam
&&TableName[Year] >=_year-4
&&TableName[Year]<=_year
),
TableName[Value]
)
That one was hard, congratulations, overwhelming 👏
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
11 | |
11 | |
8 | |
8 |
User | Count |
---|---|
24 | |
13 | |
12 | |
10 | |
10 |