The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a sumx function that first gets a value
if fact[date1] > related(table2'[date2]), 1, 0
I then use the filter function after sumx to filter by the fact table
Upto here the code runs fine. its when I try to filter by another 3rd table it causes an error
RELATED('table3[column1]) <> "Value"
This causes an error
FULL CODE BELOW:
CALCULATE (
SUMX (
'FACT TABLE',
IF (
[date1] > RELATED('table2'[date2]),
1,
0
)
),
'FACT TABLE'[Column2] <> "VALUE"
RELATED('table3'[column3]) <> "VALUE"
)
Solved! Go to Solution.
I don't think you need RELATED for that, you can simply use 'table3'[column3] <> "value"
ok thanks for that never knew if its in the filter function you don't need to use related. the filter function must just automatically detect the relationship. anyways thanks for that
Hi @akhaliq7
please try
=
COUNTROWS (
FILTER (
'FACT TABLE',
'FACT TABLE'[date1] > RELATED ( 'table2'[date2] )
&& 'FACT TABLE'[Column2] <> "VALUE"
&& RELATED ( 'table3'[column3] ) <> "VALUE"
)
)
I don't think you need RELATED for that, you can simply use 'table3'[column3] <> "value"
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
34 | |
15 | |
12 | |
7 | |
6 |