Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello community,
I have tables which I imported to Power BI. ( Table1 , Table3 and Output table )
In output table, I want to create a new column and use DAX functions as SumIf
SUM Table3[Active]
IF
Table3[Client]=Output[Client],
Table3[Policy Year]= Output[Policy Year],
Table3[Month]<Output[Month],
Table3[Class]=Output[Class],
Table3[Gender]=Output[Gender]
But.. Output table is not related to Table3.
Solved! Go to Solution.
CC =
VAR _client = Output[Client]
VAR _year = Output[Policy Year]
VAR _month = Output[Month]
VAR _class = Output[Class]
VAR _gender = Output[Class]
RETURN
SUMX(
FILTER(
Table3,
Table3[Client]= _client
&& Table3[Policy Year]= _year
&& Table3[Month]< _month
&& Table3[Class]= _class
&& Table3[Gender]= _gender
),
Table3[Active]
)
CC =
VAR _client = Output1[Client]
VAR _year = Output1[Policy Year]
VAR _month = Output1[Month]
VAR _class = Output1[Class]
VAR _gender = Output1[Gender]
VAR _result =
SUMX(
FILTER(
'(Table 3) Census',
'(Table 3) Census'[Client] = _client
&& '(Table 3) Census'[Policy Year]= _year
&& '(Table 3) Census'[Month] < _month
&& '(Table 3) Census'[Class]= _class
&& '(Table 3) Census'[Gender]= _gender
),
'(Table 3) Census'[Active]
)
RETURN
_result
Any help please?
https://alqoritm.com/DECO/SHARE/SpartaBI.pbix
Here is the file. if need I can send you zoom link also.
CC =
VAR _client = Output1[Client]
VAR _year = Output1[Policy Year]
VAR _month = Output1[Month]
VAR _class = Output1[Class]
VAR _gender = Output1[Gender]
VAR _result =
SUMX(
FILTER(
'(Table 3) Census',
'(Table 3) Census'[Client] = _client
&& '(Table 3) Census'[Policy Year]= _year
&& '(Table 3) Census'[Month] < _month
&& '(Table 3) Census'[Class]= _class
&& '(Table 3) Census'[Gender]= _gender
),
'(Table 3) Census'[Active]
)
RETURN
_result
Would be great! or if you want I can share .pbix with you.
CC =
VAR _client = Output[Client]
VAR _year = Output[Policy Year]
VAR _month = Output[Month]
VAR _class = Output[Class]
VAR _gender = Output[Class]
RETURN
SUMX(
FILTER(
Table3,
Table3[Client]= _client
&& Table3[Policy Year]= _year
&& Table3[Month]< _month
&& Table3[Class]= _class
&& Table3[Gender]= _gender
),
Table3[Active]
)
Thank you very much for reply but I get error:
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
User | Count |
---|---|
42 | |
27 | |
24 | |
20 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |