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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
arjun0028
Regular Visitor

Calculation of Running Total using quick measure

The line graph displays the running sum of C-Booking on a daily basis. The Currency parameter is created which has values ApTrack, USD and INR. While selecting on the slicer the graph should automatically display the values on the graph. While selecting the field in the slicer no output is being displayed and only getting a straight line.

Code as mentioned below

Running Sum of C-Booking = 
CALCULATE(
    [C-Booking],
    FILTER(
        ALLSELECTED('International EB'[BC_Date].[Day]), 
        'International EB'[BC_Date].[Day] <= MAX('International EB'[BC_Date].[Day])
    )
)

C-Booking = SWITCH(
    TRUE(),
    SELECTEDVALUE('Currency'[Currency]) = "ApTrack", 
        SUMX(
            NATURALINNERJOIN('International EB', 'Rates'), 
            'International EB'[Booking] * 'Rates'[ApTrack] * 1000
        ),
    SELECTEDVALUE('Currency'[Currency]) = "USD", 
        SUMX(
            NATURALINNERJOIN('International EB', 'Rates'), 
            'International EB'[Booking] / 'Rates'[USD]
        ),
    SELECTEDVALUE('Currency'[Currency]) = "INR", 
        SUMX(
            NATURALINNERJOIN('International EB', 'Rates'), 
            'International EB'[Booking] * 1000 / 'Rates'[USD] * 'Rates'[INR] / 100000
        ),
    0
)

arjun0028_0-1747304354742.png

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@arjun0028 , Try using ALL

Running Sum of C-Booking =
CALCULATE(
[C-Booking],
FILTER(
ALL('International EB'[BC_Date].[Day]),
'International EB'[BC_Date].[Day] <= MAX('International EB'[BC_Date].[Day])
)
)

 

 

and

dax
C-Booking =
SWITCH(
TRUE(),
SELECTEDVALUE('Currency'[Currency]) = "ApTrack",
SUMX(
NATURALINNERJOIN('International EB', 'Rates'),
'International EB'[Booking] * 'Rates'[ApTrack] * 1000
),
SELECTEDVALUE('Currency'[Currency]) = "USD",
SUMX(
NATURALINNERJOIN('International EB', 'Rates'),
'International EB'[Booking] / 'Rates'[USD]
),
SELECTEDVALUE('Currency'[Currency]) = "INR",
SUMX(
NATURALINNERJOIN('International EB', 'Rates'),
'International EB'[Booking] * 1000 / 'Rates'[USD] * 'Rates'[INR] / 100000
),
0
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

5 REPLIES 5
v-hjannapu
Community Support
Community Support

Hi @arjun0028,

Thanks for reaching out to the Microsoft fabric community forum.

I would also take a moment to thank @bhanu_gautam for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

If using ALL instead of ALLSELECTED in the running sum calculation ensures that the graph updates correctly based on the currency selection. This change removes unwanted filters from the date column, which was causing the straight line issue.

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

Best Regards,
Harshitha.
Community Support Team

Hi @arjun0028,

Just wanted to check if you had the opportunity to review the suggestion provided?

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.

 

Thank You.

Harshitha.

Community Support Team.

Hi @arjun0028 ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.


Thank you.

Hi @arjun0028,

May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Best Regards,
Harshitha.
Community Support Team.

bhanu_gautam
Super User
Super User

@arjun0028 , Try using ALL

Running Sum of C-Booking =
CALCULATE(
[C-Booking],
FILTER(
ALL('International EB'[BC_Date].[Day]),
'International EB'[BC_Date].[Day] <= MAX('International EB'[BC_Date].[Day])
)
)

 

 

and

dax
C-Booking =
SWITCH(
TRUE(),
SELECTEDVALUE('Currency'[Currency]) = "ApTrack",
SUMX(
NATURALINNERJOIN('International EB', 'Rates'),
'International EB'[Booking] * 'Rates'[ApTrack] * 1000
),
SELECTEDVALUE('Currency'[Currency]) = "USD",
SUMX(
NATURALINNERJOIN('International EB', 'Rates'),
'International EB'[Booking] / 'Rates'[USD]
),
SELECTEDVALUE('Currency'[Currency]) = "INR",
SUMX(
NATURALINNERJOIN('International EB', 'Rates'),
'International EB'[Booking] * 1000 / 'Rates'[USD] * 'Rates'[INR] / 100000
),
0
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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