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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
eliasayy
Impactful Individual
Impactful Individual

Percentage not adding up when selecting mutliple dates on slicer

Hello everyone,

i have a measure:

 

 

 

Percentage =
VAR Totalrevenue = Sum(Value1[total])
VAR oldvalue = Calculate(Sum(Value1[total]),[Column] = "A",Filter(Datetable [Date] < DATE(2022,10,1))
VAR newvalue = Calculate(Sumx(Value1[Qtty]*Value1[Amount]),[Column] = "A",Filter(Datetable [Date] >= DATE(2022,10,1))
VAR value = newvalue + oldvalue
Return
value/Totalrevenue

 

 

 

 

say for date1 on date slicer

Totalrevenue = 200,000
value =50,000
so percentage = 50000/200000 = 0.25

say for date2 on date slicer

Totalrevene = 300,000
value =100000
so percentage = 100000/300000 = 0.33

when i select date1 and date2 together, 
the result is 0.375 because it sums up value to 150,000 and Totalrevenue 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?

@amitchandak or @tamerj1 i could use your help 

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

Hi @eliasayy ,

Please have a try.

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

If I have misunderstood your meaning,   please provide your pbix file without privacy information and desired output with more details.

 

How to Get Your Question Answered Quickly 

 

Best Regards

Community Support Team _ Polly

 

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

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @eliasayy ,

Please have a try.

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

If I have misunderstood your meaning,   please provide your pbix file without privacy information and desired output with more details.

 

How to Get Your Question Answered Quickly 

 

Best Regards

Community Support Team _ Polly

 

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

 

Greg_Deckler
Super User
Super User

@eliasayy 

Please vote for this idea: Microsoft Idea (powerbi.com)

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors