Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am looking to create a measure based on the below data that averages the number of cases by ORDERGROUP, and if ORDERGROUP is blank, it just uses the CASES value for the ORDER. Thank you.
ORDERGROUP | ORDER | CASES |
123 | 1 | 30 |
123 | 2 | 50 |
123 | 3 | 70 |
1234 | 4 | 100 |
1234 | 5 | 30 |
1234 | 6 | 60 |
7 | 20 | |
8 | 15 |
Solved! Go to Solution.
HI @slatka11,
You can try to use the following measure formula if it helps:
formula =
VAR currGroup =
SELECTEDVALUE ( Table[ORDERGROUP] )
RETURN
IF (
currGroup <> BLANK (),
CALCULATE (
AVERAGE ( Table[Case] ),
ALLSELECTED ( Table ),
VALUES ( Table[ORDERGROUP] )
),
CALCULATE (
AVERAGE ( Table[Case] ),
ALLSELECTED ( Table ),
VALUES ( Table[Order] )
)
)
Regads,
Xiaoxin Sheng
HI @slatka11,
You can try to use the following measure formula if it helps:
formula =
VAR currGroup =
SELECTEDVALUE ( Table[ORDERGROUP] )
RETURN
IF (
currGroup <> BLANK (),
CALCULATE (
AVERAGE ( Table[Case] ),
ALLSELECTED ( Table ),
VALUES ( Table[ORDERGROUP] )
),
CALCULATE (
AVERAGE ( Table[Case] ),
ALLSELECTED ( Table ),
VALUES ( Table[Order] )
)
)
Regads,
Xiaoxin Sheng
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |