Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |