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

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
Super User
Super User

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 ?

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
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.

Top Solution Authors