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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Tomek1982
Helper I
Helper I

wrong total of measure

Calculation of a total for measures seems to be extensively commented, however I can not solve my issue.
There is following table:

Tomek1982_0-1666552227165.png

where:

Wartość jednostek = MAX('Table1'[wycena]) * 'Table2'[Running ilosc jednostek]

I understand that this way Total of "Wartosc jednostek" (104318) = Max of wycena (592) * Sum of "Running ilosc jednostek" (176), but this is not what I expect.

How can I calculate Total value to be arround 33k?

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Tomek1982 

 

You can try the following methods.

Measure =
IF (
    HASONEVALUE ( Table1[Column1] ),
    [Wartość jednostek],
    SUMX ( Table1, [Wartość jednostek] )
)

vzhangti_0-1666684772980.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

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-zhangti
Community Support
Community Support

Hi, @Tomek1982 

 

You can try the following methods.

Measure =
IF (
    HASONEVALUE ( Table1[Column1] ),
    [Wartość jednostek],
    SUMX ( Table1, [Wartość jednostek] )
)

vzhangti_0-1666684772980.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

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

latimeria
Solution Specialist
Solution Specialist

Hi @Tomek1982 ,

 

You need to make a different calculation at total level.

Try something like this:

If (isinscope('Table1'[Column1], // unique value at line level
   MAX('Table1'[wycena]) * 'Table2'[Running ilosc jednostek],
   calculate (total level)
)



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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