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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
DJsummers
Helper I
Helper I

Calculations using Dataset from SQL

Hi All


Help required and gratefully recieved! I am attempting to create a measure doing:

SUM(CumulativeWeightsView[RecordedWeight]-CumulativeWeightsView[StandardWeight])/CumulativeWeightsView[StandardWeight])

DJsummers_1-1627033102091.png

But it does not work - I can't even minus one value from the other:

DJsummers_2-1627033257382.png

The dataset is from an SQL database so wondering if the relationships are having an effect?

DJsummers_3-1627033347250.png

Let me know if I should have added more info.

Thanks Again
Dan

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @DJsummers 

 

Please try below code:-

Variance = (SUM(CumulativeWeightsView[RecordedWeight])-SUM(CumulativeWeightsView[StandardWeight]))/SUM(CumulativeWeightsView[StandardWeight])

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

2 REPLIES 2
DJsummers
Helper I
Helper I

@Samarth_18 What a dumbo I am!

Thanks very much for the extremely fast response and the second time you've helped me out.
Dan

Samarth_18
Community Champion
Community Champion

Hi @DJsummers 

 

Please try below code:-

Variance = (SUM(CumulativeWeightsView[RecordedWeight])-SUM(CumulativeWeightsView[StandardWeight]))/SUM(CumulativeWeightsView[StandardWeight])

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors