sruly
sruly

Reputation: 75

Calculations using totals in PowerBI

I have two columns of data, QuestionsAskedDaily and QuestionsAnsweredDaily.

I want to calculate the total percentage of questions which were answered (by dividing the sum of the QuestionsAnsweredDaily column by the QuestionsAskedDaily column).

I know that PowerBI will calculate the sum of each column, but how do I perform a calculation using those sums?

Upvotes: 0

Views: 99

Answers (1)

Nick Heidke
Nick Heidke

Reputation: 2847

Create two measures, one for QuestionsAskedDaily and one for QuestionsAnsweredDaily that look like this:

QuestionsAskedDaily = COUNT(<key column from questions table>)
QuestionsAnsweredDaily = COUNT(key column from answers table>)

With those two measures in place, you can create a third measure that looks like:

AnsweredQuestionsPercent = DIVIDE(QuestionsAskedDaily, QuestionsAnsweredDaily, 0)

Upvotes: 1

Related Questions