Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm a rookie in Power BI so currently I don't know how to divide ""TAK" answers with Total("Suma").
I created a matrix like that:
How to divide "TAK" with Total in Power BI for every month?
Something similar like in Excel:
No/Yes answers and Total are from two seperates columns. I want to show share of "TAK" answers for each month compared to total.
Regards,
Adam
// To do that you have to remove the filter from
// the attribute that stores your Tak/Nie. This
// depends on the structure of the model a bit,
// though...
// Say that the measure that calculates the number
// of answers (Tak, Nie, Blank) is:
[Answer Count] = COUNTROWS( T[Answer] )
// Then...
[% of Answers (abs)] =
var __currentCount = [Answer Count]
var __totalCount =
CALCULATE(
[Answer Count],
ALL( T[Answer] )
)
return
DIVIDE( __currentCount, __totalCount )
// If you want to have relative percentages,
// so-called "visual totals", then...
[% of Answers (rel)] =
var __currentCount = [Answer Count]
var __totalCount =
CALCULATE(
[Answer Count],
ALLSELECTED( T[Answer] )
)
return
DIVIDE( __currentCount, __totalCount )
Hi @adamsli ,
Try this.
Total SUM = SUM('Table'[Values])
Total SumALL = CALCULATE ([Total SUM] , ALL('Table'])
Measure = DIVIDE ([Total SUM], [Total SumALL])
Regards,
Harsh Nathani
The problem is that column with answers are text type not value and I can't convert it to the value for example decimal number in power query cause I'm receiving error in rows.
@adamsli , correct the error, use replace before data type conversion if needed.
You need to have numbers
refer, how to handle error in power query
https://www.youtube.com/watch?v=OE6DPmKqN7s
https://www.youtube.com/watch?v=9-Lag0VOiTs
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |