cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
PBrainNWH
Helper I
Helper I

Running Total help to 0 months with no data

Seeking help to 0 out all under each highlighted value, as there is no data for these months. I'm assuming I can incorporate an ISBLANK() function, but having trouble with the syntax. Here's my table:

PBrainNWH_0-1695308233534.png

 

Here is the syntax for the three RTAct coulmns:

RTAct FAN = CALCULATE(SUM('Combined VE PL Pared (2)'[Actual Amount]),filter(allselected('Calendar'[Date]),'Calendar'[Date] <=max('Calendar'[Date])),'Combined VE PL Pared (2)'[Department Code]="30-FAN")


Thanks!!

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @PBrainNWH ,

Please have a try.

RTAct FAN =
VAR CurrentDate =
    MAX ( 'Calendar'[Date] )
VAR CurrentMonth =
    MONTH ( CurrentDate )
VAR CurrentYear =
    YEAR ( CurrentDate )
VAR HasData =
    NOT ISBLANK ( SUM ( 'Combined VE PL Pared (2)'[Actual Amount] ) )
RETURN
    1
        = IF (
            HasData,
            CALCULATE (
                SUM ( 'Combined VE PL Pared (2)'[Actual Amount] ),
                FILTER (
                    ALLSELECTED ( 'Calendar'[Date] ),
                    'Calendar'[Date] <= CurrentDate
                        && 'Combined VE PL Pared (2)'[Department Code] = "30-FAN"
                )
            ),
            IF (
                CurrentMonth > 1,
                CALCULATE ( [RTAct FAN], DATE ( CurrentYear, CurrentMonth - 1, 1 ) ),
                BLANK ()
            )
        )

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @PBrainNWH ,

Please have a try.

RTAct FAN =
VAR CurrentDate =
    MAX ( 'Calendar'[Date] )
VAR CurrentMonth =
    MONTH ( CurrentDate )
VAR CurrentYear =
    YEAR ( CurrentDate )
VAR HasData =
    NOT ISBLANK ( SUM ( 'Combined VE PL Pared (2)'[Actual Amount] ) )
RETURN
    1
        = IF (
            HasData,
            CALCULATE (
                SUM ( 'Combined VE PL Pared (2)'[Actual Amount] ),
                FILTER (
                    ALLSELECTED ( 'Calendar'[Date] ),
                    'Calendar'[Date] <= CurrentDate
                        && 'Combined VE PL Pared (2)'[Department Code] = "30-FAN"
                )
            ),
            IF (
                CurrentMonth > 1,
                CALCULATE ( [RTAct FAN], DATE ( CurrentYear, CurrentMonth - 1, 1 ) ),
                BLANK ()
            )
        )

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

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

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

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