Forum Discussion
BraunReivn
3 years agoRegular Visitor
DAX Formula
Good day! Please pardon me, I'm new in this community and a complete newbie in PBI. I'll try to be clear and detailed as possible. So, here's my problem. I have 2 tables - Table 1 and Table 2. Ta...
- 3 years ago
Hi, BraunReivn
You can try the following methods.
Measure:# of Respondent = CALCULATE(COUNT('Table 2'[Respondent ID]),ALLEXCEPT('Table 2','Table 2'[Date],'Table 2'[Code_Stage]))Satge_HC M = CALCULATE(MAX('Table 1'[Stage_HC]),ALLEXCEPT('Table 2','Table 2'[Code_Stage]))Take Rate = Var _N1=SUMX('Table 2',[# of Respondent]) Var _N2=SUMX('Table 2',[Satge_HC M]) Return DIVIDE(_N1,_N2)Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 3 years ago
If you change the grouping in your visual you also need to change the formula in the measure.
Take Rate = var a = SUMMARIZE('Table 2','Table 2'[Date],'Table 2'[Stage],'Table 2'[Code],"tr",DIVIDE([# of Respondent],[Max HC],0)) return AVERAGEX(a,[tr])see attached.
v-zhangti
3 years agoCommunity Support
Hi, BraunReivn
You can try the following methods.
Measure:
# of Respondent = CALCULATE(COUNT('Table 2'[Respondent ID]),ALLEXCEPT('Table 2','Table 2'[Date],'Table 2'[Code_Stage]))Satge_HC M = CALCULATE(MAX('Table 1'[Stage_HC]),ALLEXCEPT('Table 2','Table 2'[Code_Stage]))Take Rate =
Var _N1=SUMX('Table 2',[# of Respondent])
Var _N2=SUMX('Table 2',[Satge_HC M])
Return
DIVIDE(_N1,_N2)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- BraunReivn3 years agoRegular Visitor
Thank you so much for noticing and posting a reply. I'm sure this one will work as well.