Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
37 | |
25 | |
19 | |
14 | |
8 |
User | Count |
---|---|
69 | |
48 | |
44 | |
18 | |
15 |