cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Impactful Individual

## Running Total without calculate?

Hello,

is there a way to compute running total without the calculate function? For example via creating a table variable inside a measure and sum it up via sumx?

With this sample data:

 Date Sales 01.01.2021 123 02.01.2021 423 03.01.2021 535 04.01.2021 66 05.01.2021 22 06.01.2021 11 07.01.2021 11 08.01.2021 33 09.01.2021 44

Thank you very much in advance.

Best.

1 ACCEPTED SOLUTION
Super User

@Applicable88 Yes:

``````Measure =
VAR __Date = MAX('Table'[Date])
RETURN
SUMX(FILTER(ALL('Table',[Date] <= __Date),[Sales])``````

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
3 REPLIES 3
Super User

@Applicable88 Yes:

``````Measure =
VAR __Date = MAX('Table'[Date])
RETURN
SUMX(FILTER(ALL('Table',[Date] <= __Date),[Sales])``````

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Just me, or is there a missing paren in this?

Measure =
VAR __Date = MAX('Table'[Date])
RETURN
SUMX(FILTER(ALL('Table',[Date] <= __Date),[Sales])
Community Champion

No doubt, it's your most favooooooooorite way to kick off CALCULATE. 🤣

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! DAX is simple, but NOT EASY!

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors