Forum Discussion
Comparative Analysis implementation in Power BI
HI linoybar,
AFAIK, for calculate function, it use 'and' logic to link each filters.
So if you put multiple filters in it, it will try to find out records who achieve each conditions at same time.
I think this is the reason of blank calculation result.
Maybe you can try to split your formula as two calculation and summary them get total value:
Measure =
CALCULATE (
COUNTA ( MyFactTable[IncidentKey] ),
USERELATIONSHIP ( MyFactTable[IncidentKey], MyMappingTable[IncidentKey] )
)
+ CALCULATE (
COUNTA ( MyFactTable[IncidentKey] ),
USERELATIONSHIP ( MyFactTable[IncidentKey], UnitsTable1[UnitKey] )
)
Reference link:
Order of Evaluation in CALCULATE Parameters
Regards,
Xiaoxin Sheng
Hi Anonymous,
Thanks for your reply.
In my model MyFactTable is connected to MyMappingTable, and MyMappingTable is connected to UnitsTable1.
As you can see, there is no straight connection between MyFactTable and MyMappingTable.
Only the connection between MyMappingTable and Unitstable1 is inactive - this is the one I'm trying to activate using USERRELATIONSHIP.
So maybe the part of
USERELATIONSHIP ( MyFactTable[IncidentKey], MyMappingTable[IncidentKey]
is unnecessary since it's always activated anyway.
I tried either ways, but nothing worked...
- Anonymous8 years agoNot applicable
HI linoybar,
Nope, I think it is impossible.
USERELATIONSHIP seems only works on two table who contains direct relationship, I don't think you can nested multiple functions to enable relationship for other tables.
Marco also mentioned for USERELATIONSHIP function , you can take a look at below blog to know more about it.
USERELATIONSHIP in Calculated Columns
Regards,Xiaoxin Sheng