Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |