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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PowerUser2000
Helper I
Helper I

How do I get a running total to work?

Hello, I am trying to capture the running total captured here:

Running_Total_by_AccessAndDate =
VAR CurrentAccessType =
SELECTEDVALUE('PING_USER_SIGNON_NEW (2)'[useraccesstyp])

VAR CurrentMonth =
MAX('Calendar'[YearMonthNumber])

RETURN
CALCULATE(
COUNTROWS('PING_USER_SIGNON_NEW (2)'),
FILTER(
ALL('Calendar'),
'Calendar'[YearMonthNumber] <= CurrentMonth
),
'PING_USER_SIGNON_NEW (2)'[useraccesstyp] = CurrentAccessType
)

However, this is not working properly. As it is not giving me the correct outputs. The outputs are much lower than expected.

I have a date table called Calender than has date, month_year_label (Mar-25), and YearMonthNumber (202501). Then I have my user sign on table. That I am connect to the date table on YearMonthNumber to Yearmonth in the user sign on table that is also number format (202501).

This measure was working when I had no date table being used that was connected to it for reference:

Running_Total_by_AccessAndDate 3 =
VAR CurrentAccessType = SELECTEDVALUE('PING_USER_SIGNON_NEW (2)'[useraccesstyp])
VAR MaxDateInContext = MAX('PING_USER_SIGNON_NEW (2)'[CREATEDATE])
VAR MinDateInContext = CALCULATE(MIN('PING_USER_SIGNON_NEW (2)'[CREATEDATE]), ALL('DIM_DATE'))
RETURN
CALCULATE(
    COUNTROWS('PING_USER_SIGNON_NEW (2)'),
    FILTER(
        ALL('PING_USER_SIGNON_NEW (2)'),
        'PING_USER_SIGNON_NEW (2)'[useraccesstyp] = CurrentAccessType &&
        'PING_USER_SIGNON_NEW (2)'[CREATEDATE] <= MaxDateInContext
    ),
    VALUES('DIM_DATE'[year_month_number])
)




1 ACCEPTED SOLUTION

Hi @PowerUser2000 ,

Please share the sample PBIX file, Do not include sensitive information.  It will help me to replicate  the scenario.

 

Regards,

Dinesh

View solution in original post

7 REPLIES 7
v-dineshya
Community Support
Community Support

Hi @PowerUser2000 ,

Thank you for reaching out to the Microsoft Community Forum.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.


Regards,

Dinesh

Hi @PowerUser2000 ,

We haven’t heard from you on the last response and was just checking back to see. Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Do not include sensitive information. Do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided.

 

Regards,

Dinesh

Hi @PowerUser2000 ,

We haven’t heard from you on the last response and was just checking back to see. Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Do not include sensitive information. Do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided.

 

Regards,

Dinesh

Hi @PowerUser2000 ,

We haven’t heard from you on the last response and was just checking back to see. Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Do not include sensitive information. Do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided.

 

Regards,

Dinesh

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your visualization is structured, but I tried to create a sample pbix file like below with using Viusal Calculation feature in Power BI Desktop.

 

Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn

 

Please check the below picture and the attached pbix file.

Jihwan_Kim_0-1750905754059.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hello, I am trying to create a bar chart visual like this. However, it is only capturing the running total by each month I think the totals are way too low. 

PowerUser2000_0-1750949180158.png

 

Hi @PowerUser2000 ,

Please share the sample PBIX file, Do not include sensitive information.  It will help me to replicate  the scenario.

 

Regards,

Dinesh

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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