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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
likhithar
Helper III
Helper III

Wrong Totals with SUMX Measure

I have  two Fact Tables Sales,Cost I will be creating 
 Total =Calculate(Sum(Sales[Sales])+SUM(Cost[Cost]]),FILTER(ALL(Calendar),Calendar[YYYYMM]<=MAX(Calendar[YYYYMM]))

Fact Tables are related to VEHICLE and VEHICLE TYPE TABLES based on V-YYYYMM and VT-YYYYMM

Vehicle and Vehicle Type in Fact Tables are derived based on RELATED DAX

V-VT(In fact Tables) is Concatenation of Vehicle and Vehicle Type 

For "Total" Measure,Rate should be multiplied

I tried the Following Measures,

 

The selected month rate should be multiplied with Total 

 

Rate Applied Total = (SUMX(VALUES(Secutirised[V-VT]),SUM(Secutirised[Rate])/100*[Total])*[Months Passed])/12(It is showing Correct Values, But Total is showing wrong)

Rate Applied Total_1 =(SUMX(VALUES(Secutirised[V-VT]),SUM(Secutirised[Rate])/100*[Total])*[Months Passed])/12

(With this measure the vales are showing wrong slightly, total is showing correct for the wrong vales)

 

I tried with the below sample data ,it was showing correct output.

But with the Original Data it showing wrong results.

All are measures only

 

TIA

 

 

Community Snap.PNG

 
 

 

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @likhithar ,

 

Try to make the following measure:

Final Rate value = IF(HASONEVALUE(Table[COLUMN USED ON LINE]), [Rate Applied Total], SUMX(VALUES(Table[COLUMN USED ON LINE]),[Rate Applied Total] )

 

You should use the column that you are using on the matrix in the formula above, then use this measure instead of the final rate value.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @likhithar ,

 

Try to make the following measure:

Final Rate value = IF(HASONEVALUE(Table[COLUMN USED ON LINE]), [Rate Applied Total], SUMX(VALUES(Table[COLUMN USED ON LINE]),[Rate Applied Total] )

 

You should use the column that you are using on the matrix in the formula above, then use this measure instead of the final rate value.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.