Help with Measure from one fact table used in conform dim with filter on another fact #1310
TinyTimothy2
started this conversation in
Data Modeling
Replies: 1 comment
-
You seem to have a bidirectional filter set somewhere that propagates the slicer "Fact_A[Program X] = 'XYZ'" onto fact_b. Is this the same model that you mentioned in #1311? If so, the bidirectional filter mentioned therein would explain this behavior. Alternatively, could you share a demo model that shows the behavior you see? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have 2 Fact tables:
Fact_A
Fact_B
I have conforming dimensions
Dim_Date
Dim_User
I have measures that gives count of customers from Fact_A and Fact_B
[Total Customers w/ Fact A]= DISTINCTCOUNT(Fact_A[Cust_ID])
[Total Customers w/ Fact B]= DISTINCTCOUNT(Fact_B[Cust_ID])
And these are used in a matrix with Dim_User and another matrix with dim_Date
In the matrix with dim_User the users names are rows.
I set a filter using a slicer for Fact_A[Program X] = 'XYZ'
This limits the users to only users that have a record in Fact_A[Program x] = 'XYZ'
[Total Customers w/ Fact A] is correct
[Total Customers w/ Fact B] is not correct (it now show same values as [Total Customers w/ Fact A]
This is close. It show the correct Total Customers w/ Fact B. But the grand total is incorrect. It appears to be totaling all users that are filters in the matrix.
VAR _Result_Fact_B = Calculate (
DISTINCTCOUNT(Fact_B[Cust_ID])
, ALL(Fact_A[Program XYZ])
)
VAR _Result = IF ( ISBLANK ( [Total Sales] ) ,
BLANK() ,
_Result_Fact_B)
Return
_Result
Any ideas how to fix this.
Ultimately the 'process' would need to apply to any filter that is not conforming for FACT_A/FACT_B
Beta Was this translation helpful? Give feedback.
All reactions