cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## Running Totals on Selected Dates

Hi

I've looked, but can't seem to find a solution, and keep running down rabbit holes, so am reaching out for some help / direction on how to tackle this.

I have a Transaction Table, with Sales with Dates and Time.  I've got two additional supporting tables for Date and Time respectively.  I've created a measure for Running Total of Transactions throughout the day, and would like to compare any two days of my choosing.

My initial idea is to create another Date table, and create two seperate measures, one for Date 1, and the other for Date 2, and have both measures appear on the same graph....  But I appear to be coming unstuck...

This is the measure I am using (Non Date Filtered):

Cumulative Sales (Calendar 1) = IF (
COUNTROWS ( 'Transaction Line' ) > 0,
CALCULATE (
[Sum Transactions],
FILTER (
ALLSELECTED ( 'Time Table'[Time] ),
'Time Table'[Time] <= MAX ( ( 'Time Table'[Time]) )
)
),
BLANK ()
)

IS my approach right?  If not, what approach would you consider?

1 ACCEPTED SOLUTION
Helper II

Thanks for the pointer.  In the end I used USERELATIONSHIP to achieve exactly what I wanted:

**Except for Dynamically naming the series based on the slicer date selection............  😞

3 REPLIES 3
Helper II

Thanks for the pointer.  In the end I used USERELATIONSHIP to achieve exactly what I wanted:

**Except for Dynamically naming the series based on the slicer date selection............  😞

Helper II

I could see that...  But am not sure on how to create a measure on a table that isn't connected in the Schema - Do I create a "virtual join" in the code (Using something like Lookupvalue) ?

Super User

@Robbief If you are choosing 2 dates that are both connected to the same fact table via something like slicers, then this will cause problems. You would need those tables to be disconnected tables (no relationship) for that to work.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors