I have three columns in a table and we are using parameters to select the required column to the table.
Based on the selected column, I need to summarize and do some calculation.
I am stuck and unable to find how to make “VAR SUMMERISE” to work, this variable should summerize the selected columns only. I am using this to find the denominator.
It works fine when all three columns are selected, but I need to summerize based on the selected column
Parameter are [column names]: We have a slicer on the page
Partnername
partnerTYPE
partnercountry
I need a syntax to summarize just the selected columns
Salary- Measure =
var sumfc= sum ('Table'[Salary])
VAR SUMMERISE = SUMMARIZE('Table','Table'[Partnercountry],'Table'[Partnername],'Table'[Partnertype],"averagesum",sumfc)
return
IF(
OR(ISINSCOPE( 'Table'[Partnercountry]),OR(ISINSCOPE( 'Table'[Partnername]),ISINSCOPE('Table'[Partnertype]))),
sumfc,
DIVIDE(sumfc,COUNTROWS(SUMMERISE ))
)
Sample.pbix (30.4 KB)
Hey, Christina
Hope you are doing well!
using Power query group by option you can summaries the multiple col.
I have created Table 2 using power query.
let me know it works for you or not.
Warm Regards
Sample.pbix (35.3 KB)
,
Pankaj
Hello @PankajNamekar
Just following up if the response from @PankajNamekar helps you solve your inquiry.
If it did, please mark his answer as the SOLUTION.
In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.
1 Like
No, it doesnt work.
Thanks for trying
1 Like
Hi @christina.weber
We noticed that your inquiry was left unsolved for quite some time now.
Looks like your inquiry was out of the experts and users’ bounds.
If you were sure you provided all pertinent context to your concerns and read how to use the forum more effectively and still find your question unanswered, your membership also comes with relevant resources that may help you with your Power BI education, so we advise that you check these resources as well.
While our users and experts do as much as reasonable to help you with your inquiries, not all concerns can be attended to especially if there are some learnings to be done. Thank you!