Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have attached model and trying a simple dax but one is not invoking a relationship:
This dax invoke the relationship between Fact and Vendor but it is slow:
Count Jobs 1 =
CALCULATE(DISTINCTCOUNT(Fact[Job ID]), CONTAINSSTRING( Vendor[Vendor Name],"abc"),
FILTER(Fact, Fact[Quantity] >0 ))
but this one does not invoke between Fact and Vendor (it does not filter vendors that have 'abc' string in them) but is faster as each line in Job table is unique:
Count Jobs 2 =
CALCULATE(COUNTROWS(Job), CONTAINSSTRING( Vendor[Vendor Name],"abc") ,
FILTER(Fact, fact[Quantity] >0 ))
How can I make the measure 'Count Job 2' use the filter CONTAINSSTRING( Vendor[Vendor Name],"abc")?
Thanks.
Solved! Go to Solution.
@Anonymous , as both dimensions are not related, that is why that might not work.
Try like
Count Jobs 2 =
CALCULATE(CALCULATE(COUNTROWS(Job),FILTER(Fact, fact[Quantity] >0 )) , CONTAINSSTRING( Vendor[Vendor Name],"abc") ,
)
or use the first one
@Anonymous , as both dimensions are not related, that is why that might not work.
Try like
Count Jobs 2 =
CALCULATE(CALCULATE(COUNTROWS(Job),FILTER(Fact, fact[Quantity] >0 )) , CONTAINSSTRING( Vendor[Vendor Name],"abc") ,
)
or use the first one
User | Count |
---|---|
116 | |
73 | |
58 | |
49 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |