Forum Discussion
Jane689
3 years agoHelper I
multiple columns in calculate function
Hi , I have created below measure - measure = CALCULATE(SUM(table[visits]),Allselected(table[pagename])) but i want to take sum of other columns also . Let me know how can i incorporate, ...
- Anonymous3 years ago
Hi Jane689 ,
I have created a simple sample, please refer to it to see if it helps you.
Create 2 measures.
Measure = MAX('Table'[videos])+MAX('Table'[filedownloads])+MAX('Table'[visits])Measure 2 = var _b=SUMMARIZE('Table','Table'[pagename],"aaa",[Measure]) return IF(HASONEVALUE('Table'[pagename]),[Measure],SUMX(_b,[aaa]))If it still does not help, please provide more details with your desired output and pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jihwan_Kim
3 years agoSuper User
Hi,
I am not sure how your datamodel looks like, but please try the below whether it suits your requirement.
new measure =
CALCULATE (
SUMX ( table, table[visits] + table[filedownloads] + table[videos] ),
ALLSELECTED ( table[pagename] )
)