cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
radissoufan Regular Visitor
Regular Visitor

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

Accepted Solutions
sturlaws New Contributor
New Contributor

Re: get previous Round value

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

radissoufan Regular Visitor
Regular Visitor

Re: get previous Round value

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 New Contributor
New Contributor

Re: get previous Round value

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

radissoufan Regular Visitor
Regular Visitor

Re: get previous Round value

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

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 148 members 1,772 guests
Please welcome our newest community members: