Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

get previous Round value

hello...

I have a fact

 

idvalround
1101
221
311
42011
51530
61530

 

 

and I have a round Dim wich related to column round in the fact

IDDESCorder
1ROUND 11
11ROUND 22
30ROUND 33

 

 

I need to find sum of values in round for previous round... 

the output should be like

Column1sum of valuePrevious ROUND VALUE
ROUND 113 
ROUND 22013
ROUND 33020
2 ACCEPTED SOLUTIONS
sturlaws
Resident Rockstar
Resident Rockstar

Assuming that the [order]-column can be used to identify the order of the rounds and that you have a relationship between table[round] and dimRound[ID], you can create this measure:

Value previous round =
CALCULATE (
    sum(Table[val]));
    FILTER ( ALL ( dimRound ); dimRound[order] = SELECTEDVALUE ( dimRound[order] ) - 1 )
)

View solution in original post

Anonymous
Not applicable

thank you>>

 

Measure22:=CALCULATE (
SUM ( Table1[VAL] ),
FILTER (
ALL ( Table2),
Table2[order] = IF (HASONEVALUE(Table2[order] ), VALUES ( Table2[order]) - 1 )
)
)

View solution in original post

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Assuming that the [order]-column can be used to identify the order of the rounds and that you have a relationship between table[round] and dimRound[ID], you can create this measure:

Value previous round =
CALCULATE (
    sum(Table[val]));
    FILTER ( ALL ( dimRound ); dimRound[order] = SELECTEDVALUE ( dimRound[order] ) - 1 )
)
Anonymous
Not applicable

thank you>>

 

Measure22:=CALCULATE (
SUM ( Table1[VAL] ),
FILTER (
ALL ( Table2),
Table2[order] = IF (HASONEVALUE(Table2[order] ), VALUES ( Table2[order]) - 1 )
)
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.