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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

SUM VALUES FOR THE PREVIOUS ROUND

Hello...

I have table employee

which have 

IDVALUEROUND
1101
2101
3101
4202
5302
6203
7203
8203

and round table which have 

ROUND
1
2
3

 

how to write dax eqaution to sum values for previous round

eg. output

ROUNDsumprev sum
130 
25030
36050

 

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous 

Measure =
CALCULATE (
    SUM ( Table1[VALUE] ),
    FILTER (
        ALL ( Table1[Round] ),
        Table1[Round] = ( SELECTEDVALUE ( Table1[Round] ) - 1 )
    )
)

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

   

Anonymous
Not applicable

thank you for responding...

but ssas doesn't support the function 

SELECTEDVALUE 

is there any work around ?

AlB
Community Champion
Community Champion

Measure =
CALCULATE (
    SUM ( Table1[VALUE] ),
    FILTER (
        ALL ( Table1[Round] ),
        Table1[Round] = IF ( HASONEVALUE ( Table1[Round] ), VALUES ( Table1[Round] ) - 1 )
    )
)

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.