Forum Discussion
Anonymous
7 years agoNot applicable
Dax Help
Hi folks - I need help with the formulas to produce the results in the last 2 (green highlighted) columns below. Any help would be greatly appreciated!
- 7 years ago
Hi Anonymous
Create calculated columns
Column = CALCULATE ( SUM ( Sheet5[Daily Minutes Spent] ), FILTER ( ALLEXCEPT ( Sheet5, Sheet5[Name], Sheet5[Attendance Date], Sheet5[Attended] ), [Activity] = "Fitness" ) ) Column 2 = CALCULATE ( DISTINCTCOUNT ( Sheet5[Attendance Date] ), FILTER ( ALLEXCEPT ( Sheet5, Sheet5[Name] ), [Activity] = "Fitness" && [Column] >= 60 ) )or create measures
Measure = IF ( MAX ( [Activity] ) = "Fitness", CALCULATE ( SUM ( Sheet5[Daily Minutes Spent] ), FILTER ( ALLEXCEPT ( Sheet5, Sheet5[Name], Sheet5[Attendance Date], Sheet5[Attended] ), [Activity] = "Fitness" ) ), " " ) Measure 2 = CALCULATE ( DISTINCTCOUNT ( Sheet5[Attendance Date] ), FILTER ( ALLEXCEPT ( Sheet5, Sheet5[Name] ), [Activity] = "Fitness" && [Measure] >= 60 ) )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
7 years agoCommunity Support
Hi Anonymous
Create calculated columns
Column =
CALCULATE (
SUM ( Sheet5[Daily Minutes Spent] ),
FILTER (
ALLEXCEPT ( Sheet5, Sheet5[Name], Sheet5[Attendance Date], Sheet5[Attended] ),
[Activity] = "Fitness"
)
)
Column 2 =
CALCULATE (
DISTINCTCOUNT ( Sheet5[Attendance Date] ),
FILTER (
ALLEXCEPT ( Sheet5, Sheet5[Name] ),
[Activity] = "Fitness"
&& [Column] >= 60
)
)
or create measures
Measure =
IF (
MAX ( [Activity] ) = "Fitness",
CALCULATE (
SUM ( Sheet5[Daily Minutes Spent] ),
FILTER (
ALLEXCEPT ( Sheet5, Sheet5[Name], Sheet5[Attendance Date], Sheet5[Attended] ),
[Activity] = "Fitness"
)
),
" "
)
Measure 2 =
CALCULATE (
DISTINCTCOUNT ( Sheet5[Attendance Date] ),
FILTER (
ALLEXCEPT ( Sheet5, Sheet5[Name] ),
[Activity] = "Fitness"
&& [Measure] >= 60
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
7 years agoNot applicable
v-juanli-msft thank you! Can you assist with the formula for post below?
https://community.powerbi.com/t5/Desktop/DAX-formula-help/m-p/604541#M287776