How to write a DAX running total that respects its own resource hierarchy and resets appropriately

0 votes

How to write a DAX running total that respects its own resource hierarchy and resets appropriately?

I need a way to create a DAX running total that respects the hierarchy in my data and resets at the appropriate levels. I’m looking for an automated solution to ensure consistency in reporting.

11 hours ago in Power BI by Evanjalin
• 33,070 points
6 views

1 answer to this question.

0 votes
To create a DAX running total that respects the hierarchy and resets at appropriate levels, you can use the CALCULATE, SUM, and FILTER functions along with the ALL function to remove filters at the desired hierarchy levels. Here's an example:

RunningTotal =
CALCULATE(
    SUM('Table'[Amount]),
    FILTER(
        ALL('Table'[HierarchyLevel1], 'Table'[HierarchyLevel2]),
        'Table'[Date] <= MAX('Table'[Date])
    )
)

In this example, replace 'Table'[Amount] with the column you want to sum and adjust the hierarchy levels (HierarchyLevel1, HierarchyLevel2) to match your data model. This will reset the total at each new hierarchy level while calculating the running total.
answered 11 hours ago by anonymous
• 33,070 points

Related Questions In Power BI

0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 33,050 points
19,530 views
0 votes
1 answer

How to restart running total column with Power BI Desktop DAX?

This is not only a running total ...READ MORE

answered Dec 8, 2020 in Power BI by Gitika
• 65,730 points
2,153 views
0 votes
1 answer

How do you write DAX expressions that work well with disconnected tables and slicers?

The best way to maneuver using isolated ...READ MORE

answered Dec 18, 2024 in Power BI by Vani
• 3,580 points

edited Mar 6 482 views
+1 vote
3 answers

How do I create a flexible date range slicer that allows users to switch between monthly, quarterly, and yearly views?

Proper date hierarchy and dynamic date filters ...READ MORE

answered Nov 12, 2024 in Power BI by pooja
• 24,450 points
482 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,090 points
1,774 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,090 points
3,135 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,938 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 2,132 views
0 votes
1 answer

I need to calculate a running total but reset it at the start of each new quarter—how can I achieve this in DAX?

To calculate a running total that resets ...READ MORE

answered Mar 7 in Power BI by anonymous
• 33,070 points
250 views
0 votes
1 answer

How can I use DAX to generate a dynamic ranking that changes based on selected filters?

You can create a dynamic ranking measure ...READ MORE

answered Mar 25 in Power BI by anonymous
• 33,070 points
224 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP