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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculation

Hi Team,

 

I have some data shown below.

 

MonthFolio startsFolio endsProductCodeDisposalWorking capacityTank ratio
Feb2022020120220229XT-0012,275,0003,288,1030.69
March2022030120220332XT-0013,974,0003,288,1031.21
April2022040120220431XT-0012,868,0003,288,1030.87
May2022050120220532XT-0012,339,0003,288,1030.71
        
Feb2022020120220229YT-0022,152,0002,681,1410.8
March2022030120220332YT-0021,600,0002,681,1410.6
April2022040120220431YT-0021,636,0002,681,1410.61
May2022050120220532YT-0021,578,0002,681,1410.59
        
Feb2022020120220229ZT-0031,555,0002,674,7020.58
March2022030120220332ZT-0032,972,0002,674,7021.11
April2022040120220431ZT-0033,982,0002,674,7021.49
May2022050120220532ZT-0032,265,0002,674,7020.85
        
Feb2022020120220229WT-0041,930,0003,898,7860.5
March2022030120220332WT-0042,496,0003,898,7860.64
April2022040120220431WT-0042,076,0003,898,7860.53
May2022050120220532WT-0043,604,0003,898,7860.92

 

I need output like this.

 

Feb    7,912,00012,542,7320.63
March    11,042,00012,542,7320.88
April    10,562,00012,542,7320.84
May    9,786,00012,542,7320.78

 

so the disposal is sum of all the months.When comes to work capacity it is not summing correctly.While taking this ratio in the bar graph it is adding all the values because the work capacity is same.If I am trying to write the measure it is adding all the values.

 

It is working fine on the Matrix table visual.When comes to Bargraph it is not showing correctly.

 

Could anyone please help me on this.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:

Ratio = 
VAR _selmonth =
    SELECTEDVALUE ( 'Table'[Month] )
VAR _disposal =
    CALCULATE ( SUM ( 'Table'[Disposal] ), ALLSELECTED ( 'Table'[Month] ) )
VAR _wc =
    CALCULATE ( SUM ( 'Table'[Working capacity] ), ALLSELECTED ( 'Table'[Month] ) )
RETURN
    DIVIDE ( _disposal, _wc )

yingyinr_0-1656996657834.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:

Ratio = 
VAR _selmonth =
    SELECTEDVALUE ( 'Table'[Month] )
VAR _disposal =
    CALCULATE ( SUM ( 'Table'[Disposal] ), ALLSELECTED ( 'Table'[Month] ) )
VAR _wc =
    CALCULATE ( SUM ( 'Table'[Working capacity] ), ALLSELECTED ( 'Table'[Month] ) )
RETURN
    DIVIDE ( _disposal, _wc )

yingyinr_0-1656996657834.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Nathaniel_C
Community Champion
Community Champion

Hi @Anonymous 

Please provide your pbix.


If you would share your pbix, or dummy up some values in Excel both for current and expected data. Please copy and paste them into your post, rather than doing a picture, we may be able to help you. 

Please read this post to get your question answered more quickly:

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.