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
binayjethwa
Helper IV
Helper IV

Calculate sum of Calculated measure

Hi  all , 

 

I have the following measure where i am creating a calculated measure based on certain criteria as below.

Now i want the sum of my t_measure as my output so i can show overall number in a card.

 

I tried Sumx but it doesnt work as expected. can someone help here.

 

t _Measure =
VAR BOD = [Performance_BodAsprirations] * [Weight _Level 1]
VAR frequency = AVERAGE(Mapping_dim[Level1_Frequency])
VAR result=DIVIDE(bod,frequency)
return
result
 
Thanks,
Binay
6 REPLIES 6
TomasAndersson
Solution Sage
Solution Sage

Hi!
Can you share some data and what your expected result is? Sounds like a SUMX() should work but if it doesn't it must be something I'm missing.

hi @TomasAndersson  So basically i have below data where the measures are calulated.

 

t_measure = bod* weight / freq

 

so i want sum of T _ measure which should be (7.47+2.65+2.30+......8.87)=55.63% 

If i use sumx as below i see following result. can u please help here.

Final _Bod = SUMX (Mapping_dim,[t _Measure])
 
binayjethwa_3-1673944313889.png

 

 

binayjethwa_2-1673944252755.png

 

I see! Try doing the same measure but as a SUMX() from the beginning instead, sort of like:

SUMX T_ measure = 
SUMX(Table,
    DIVIDE(Table[Bod] * Table[Weight],Table[freq])
)

You'd have to adjust above according to your table/column names.

Then you get the total as expected:

TomasAndersson_0-1673945781899.png



Hope this helps!

Hi @TomasAndersson 

There are the calculations of my measures.

Based on below measures , can u please tell me how to proceed, as i still dont get desired result. Thanks in advance.

 

BOD=averagex(values(Mapping_dim[Test_Level1]),AVERAGEX(VALUES('mapping_dim'[Level2]), AVERAGEX(VALUES('mapping_dim'[Level3]),AVERAGEX(VALUES('mapping_dim'[Level4]), AVERAGEX(VALUES('mapping_dim'[Level5,6]),

CALCULATE(SUM(All_Bls_Fct[Performance_New])))))))
 
Weight =average('Overall Weights_Level1'[Weight])
Freq = average(Mapping_dim[Level1_Frequency])
 
t _Measure =
VAR BOD = [Performance_BodAsprirations] * [Weight _Level 1]
VAR frequency = average(Mapping_dim[Level1_Frequency])
VAR result=DIVIDE(bod,frequency)
return
 result

 

Thanks,

Binay

amitchandak
Super User
Super User

@binayjethwa , You can try like

 

using common dim

 

sumx(Mapping_dim, [t_measure])

 

 

or some column

 

sumx(dim1[Col1], [t_measure])

Hi @amitchandak ,

 

This is the data what i am having . so basically 

t_measure = bod* weight / freq

 

so i want sum of T _ measure which should be (7.47+2.65+2.30+......8.87)=55.63% 

If i use sumx as below i see following result.

Final _Bod = SUMX (Mapping_dim,[t _Measure])

binayjethwa_0-1673943802202.png

 

binayjethwa_1-1673944016347.png

 

 

 

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.