Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
When relationship is intactive, result is as below :
While the same code with active relationship provides the right result as below :
How should I rewrite the code to be able to inactivate relation and use "userelationship()" fuction in measure instrad.
Solved! Go to Solution.
@tanat_inc , Try a measure like
Campus Visit =
VAR _table = SUMMARIZE('f_visit_info','f_visit_info'[visit_date],"distinctcount",calculate(DISTINCTCOUNTNOBLANK('f_visit_info'[hn]),
USERELATIONSHIP('d_date_table'[Date],f_visit_info[visit_date])))
RETURN CALCULATE(
SUMX(_table,[distinctcount])
)
@tanat_inc , Try a measure like
Campus Visit =
VAR _table = SUMMARIZE('f_visit_info','f_visit_info'[visit_date],"distinctcount",calculate(DISTINCTCOUNTNOBLANK('f_visit_info'[hn]),
USERELATIONSHIP('d_date_table'[Date],f_visit_info[visit_date])))
RETURN CALCULATE(
SUMX(_table,[distinctcount])
)
It's work !!!
You solved 3 of my issues already in this month.
That's really save my day.
Thank you very much 🙂 🙂
Thanks friend, this should be a useful alternative work around.
User | Count |
---|---|
104 | |
92 | |
88 | |
78 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |