The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Community!
I have client survey data and have calculated a % change over ~90 days, from Survey 1 to Survey 3 -- my DAX below:
[Change Rate] =
var ClientsWithBothSurveys =
FILTER(
DISTINCT( T[ClientNum] ),
// Based on the info you've given,
// the client can have either 1
// or 2 surveys. You want only
// the clients with 2 surveys.
CALCULATE(
DISTINCTCOUNT( T[Survey] ) = 2
)
)
var AvgRating1 =
CALCULATE(
AVERAGE( T[Rating] ),
ClientsWithBothSurveys,
KEEPFILTERS(
T[Survey] = 1
)
)
var AvgRating3 =
CALCULATE(
AVERAGE( T[Rating] ),
ClientsWithBothSurveys,
KEEPFILTERS(
T[Survey] = 3
)
)
var Result =
DIVIDE(
AvgRating3 - AvgRating1,
AvgRating1
)
return
Result
However, having a model with just one table is one where you're gonna face issues, even if your formulas are perfectly correct.
Watch this as a warning: https://www.youtube.com/watch?v=aRntX-HiiN8&t=270s
User | Count |
---|---|
24 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |