GTA
GTA

Reputation: 75

Power BI - Table Visualization Totals Row

I have created the following table as a vizualization in Power BI.

The blue columns are measures I created. I need the totals for those columns to equal the sum of the visible values on in the table. Do I need to create the variances as calculated columns instead of measures?

The desired result would be for the Unit Variance column to total $3.87 and the Total Variance column to total $923.76.

Unit Variance is being calculated as follows

average('Sent'[SentAmount]) - average(Received[Received Amount])

Total Variance is being calculated as follows

[Unit Variance] * sum('Sent'[Sent Volume])

Upvotes: 0

Views: 1789

Answers (1)

GTA
GTA

Reputation: 75

Here is the answer I came up with

I left the unit variance as a measure

unit variance = average('Sent'[SentAmount]) - average(Received[Received Amount])

But I made the total variance a column

Total Variance = ((SUMX(Filter('Sent','Sent'[Sent Volume] = 1),'Sent'[Sent Volume])) / sum('Sent'[Sent Volume])) * [Unit Variance]

I have a column in my sent table that puts a "1" in the row to count volume.

Upvotes: 0

Related Questions