Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have a table with several dates columns, and I need to create a table with counts of them.
The basic ones, which are of the form CALCULATE( COUNTA( Table[Column] ), USERELATIONSHIP( Calendar[Date], Table[Date_Col] ) I already know how to get.
What I'd like to know is whether I can use USERELATIONSHIP several times in the same measure, and specify to which part of the measure that relationship has to be applied. Something like this:
Measure = CALCULATE( COUNTA( Table[Column1] ),
FILTER( Table, Table[Date_1] <> BLANK() ) && USERELATIONSHIP( Calendar[Date], Table[Date_1] ),
FILTER( Table, Table[Date_2] = BLANK() ) && USERELATIONSHIP( Calendar[Date], Table[Date_2] )
)
Thanks in advance!
Solved! Go to Solution.
@martifapa , Not for the same table set.
But you can try as
Measure = CALCULATE( COUNTA( Table[Column1] ),
FILTER( Table, Table[Date_1] <> BLANK() ) , USERELATIONSHIP( Calendar[Date], Table[Date_1] ))
)
+
CALCULATE( COUNTA( Table[Column1] ), FILTER( Table, Table[Date_2] = BLANK() ), USERELATIONSHIP( Calendar[Date], Table[Date_2] ))
Hi @Anonymous
If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!
If not, please kindly elaborate more.
@martifapa , Not for the same table set.
But you can try as
Measure = CALCULATE( COUNTA( Table[Column1] ),
FILTER( Table, Table[Date_1] <> BLANK() ) , USERELATIONSHIP( Calendar[Date], Table[Date_1] ))
)
+
CALCULATE( COUNTA( Table[Column1] ), FILTER( Table, Table[Date_2] = BLANK() ), USERELATIONSHIP( Calendar[Date], Table[Date_2] ))
User | Count |
---|---|
89 | |
88 | |
75 | |
67 | |
58 |
User | Count |
---|---|
137 | |
110 | |
91 | |
84 | |
69 |