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
jesly_ajin
Helper III
Helper III

Calculation using 2 measures gives in correct total in Table

Hi dears,

I have 2 measures namely - 

1. ECPlanCount is SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1), SelfService_Plan_DailyPlanHour[ECPlannedCount])
 
2. ECPlanCost is SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1), SelfService_Plan_DailyPlanHour[ECPlannedCost])
 
3. I have another measure that uses these measures
DActualCost = [ECPlanCount]*10*[ECPlanCost]
 
When these are put in matrix or table, the sum of ECPlanCount & ECPlanCost, however, the total os DActualCost is incorrect.
Kindly help.
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @jesly_ajin ,

 

I created a sample pbix with your measure.

18.png

 

You can use new measure like

DActualCost = SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1),[ECPlanCount]*10*[ECPlanCost])

Screenshot 2021-04-13 142843.png

 

Or

AnotherDActualCost = CALCULATE([ECPlanCount]*10*[ECPlanCost],ALL('SelfService_Plan_DailyPlanHour'))

Screenshot 2021-04-13 143139.png

 

Best Regards,

Stephen Tao

 

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
v-stephen-msft
Community Support
Community Support

Hi @jesly_ajin ,

 

I created a sample pbix with your measure.

18.png

 

You can use new measure like

DActualCost = SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1),[ECPlanCount]*10*[ECPlanCost])

Screenshot 2021-04-13 142843.png

 

Or

AnotherDActualCost = CALCULATE([ECPlanCount]*10*[ECPlanCost],ALL('SelfService_Plan_DailyPlanHour'))

Screenshot 2021-04-13 143139.png

 

Best Regards,

Stephen Tao

 

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

amitchandak
Super User
Super User

@jesly_ajin , Multiplication should be done at line level, Try like

DActualCost =

SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1), SelfService_Plan_DailyPlanHour[ECPlannedCount]*SelfService_Plan_DailyPlanHour[ECPlannedCost])

@amitchandak I tried but it is giving blank values.

@jesly_ajin there was *10 too, try

SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1), SelfService_Plan_DailyPlanHour[ECPlannedCount]*SelfService_Plan_DailyPlanHour[ECPlannedCost]*10)

 

or

 

SUMX(FILTER(SelfService_Plan_DailyPlanHour, SelfService_Plan_DailyPlanHour[RANKPlan]=1), SelfService_Plan_DailyPlanHour[ECPlannedCount]*SelfService_Plan_DailyPlanHour[ECPlannedCost])*10

 

 

if not

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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.