cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajal161292 Helper V
Helper V

To calculate the total dynamically

Hi,

 

I am stuck up in calculating a running total for one of my reports.In the image given beloww i would basically liske to adjust the on hand demand like the one shown below.

Capture.PNG

 

Presently it is taking the values that are coming from the database and then adding it up.I have used a calculated measure for doing up the cumulative calculation.

 

Capture2.PNG

 

Any help would be much appreciated!!

 

17 REPLIES 17
Community Support
Community Support

Re: To calculate the total dynamically

Hi @sajal161292,

 

Please share the sample pbix file to test, it will be help to analysis your situation.(if your file contains some privacy data, you only need to share part of them or use original structure to create some fake data)


BTW, measures which works on specific filters normally not work properly on total row. In my opinion, you need to add a filter to check on total row and write a specific formula who works on total row.

 

For example: 

checkrow =
IF (
    COUNTROWS ( table ) <> COUNTROWS ( ALLSELECTED ( table ) ),
    "normula row",
    "total row"
)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
Super User IV
Super User IV

Re: To calculate the total dynamically

Hi,

 

Share the download link of your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
sajal161292 Helper V
Helper V

Re: To calculate the total dynamically

Hi,

 

Thank you for your reply.

My pbix file is having some private data.So is there any way to share it with you by hiding the data that is private?

Super User IV
Super User IV

Re: To calculate the total dynamically

Dummy your dataset and then share the download link.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sajal161292 Helper V
Helper V

Re: To calculate the total dynamically

Hi,

 

I am unable to attach my pbix file in the message.

So could you please tell me a way to do this?

Super User IV
Super User IV

Re: To calculate the total dynamically

Hi,

 

Upload the file to Google Drive and share the download link here.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sajal161292 Helper V
Helper V

Re: To calculate the total dynamically

Hi,

 

Thank you for help.

I have uploaded my file in the location below:

 

https://drive.google.com/drive/folders/12Ou3PcwDie0aju7ZV8ISSbeKsvXdZ6Vp

 

In the file if you will click on B then a screenshot will appear as follows

 

InkedCapture6_LI.jpg

 

 

So now I would like to see the previous week's running total value in the on hand supply part till last week and again calcluate the running total with the newly adjusted values.

 

Thanks.

Super User IV
Super User IV

Re: To calculate the total dynamically

Hi,

 

I need permissino to download the file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sajal161292 Helper V
Helper V

Re: To calculate the total dynamically

Hi,

 

I have updated my test file with some changes in the calculation for running total

 

I need to change my pbi file as follows:

The cumulative total for a previous week should be assigned to the on hand quantity of next week.

 

week 47:

 

On hand = total of week 46 = 557.72

 

week 48:

 

On hand = total of week 47 =  -993.83

 

week 49:

 

On hand = total of week 48 = -1551.55 +(- 993.83) = -2545.83

 

and like this in the remaining weeks.

 

Capture8.PNGcapture9.PNG

 

Please find the updated link below.

 

https://drive.google.com/drive/folders/12Ou3PcwDie0aju7ZV8ISSbeKsvXdZ6Vp?usp=sharing

 

I need to implement this in one of my report very urgently.

 

Any help will be greatly appreciated!!

 

 

 

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors