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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

percentage not adding up when selected multiple dates

Hello everyone,

i have a measure:

 

 

Percentage =
VAR value1 = Sum(Value1[total])
VAR value2 = Sum(Value2[total])
Return
value2/value1

 

 

say for date1 on date slicer

value1 = 200,000
value2 =50,000
so percentage = 50000/200000 = 0.25

say for date2 on date slicer

value1 = 300,000
value2 =100000
so percentage = 100000/300000 = 0.33

when i select date1 and date2 together, 
the result is 0.375 because it sums up value1 to 150,000 and value2 to 400,000 so 150000/400000 = 0.375

my desired result is to sum up the 2 percentage from date1 and date 2

so 0.25 + 0.33 = 0.58

how can i acheive that?



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Please add [Percentage] measure into SUMX() expression instead of the measure code.

You new measure should calculate based on [Percentage] measure.

New Percentage =
SUMX ( VALUES ( Date[date] ), [Percentage] )

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Create a measure like , Assuming we have common date table in this case

 

Sumx(Values(Date[date]), calculate(divide(Sum(Value1[total]), Sum(Value2[total]) )))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

it did ot work please check the other one https://community.powerbi.com/t5/DAX-Commands-and-Tips/Percentage-not-adding-up-when-selecting-mutli...

this is my exact measure and calculation i want to use

Anonymous
Not applicable

hello i do have a relationship with the table and date table,
but it still didnt work for some reason

Anonymous
Not applicable

Hi @Anonymous ,

 

Please add [Percentage] measure into SUMX() expression instead of the measure code.

You new measure should calculate based on [Percentage] measure.

New Percentage =
SUMX ( VALUES ( Date[date] ), [Percentage] )

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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