Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am working on one peculiar request,
We are using parameter in the table and we need totals in the rows and average in the totals.
Table is this format:
A | MVA | uk | 1000 |
B | DVP | us | 2000 |
A | MVA | us | 3000 |
C | MVN | uk | 1000 |
A | MVP | uk | 1000 |
Parameter are : We have a slicer on the page
☑️Partnername
⏹partnerTYPE
☑️partnercountry
The formula should consider all three columns[Partnername partnerTYPE partnercountry ]
I need result like this:
A | uk | 2000 |
B | us | 2000 |
A | us | 3000 |
C | uk | 1000 |
Total | 2000 |
Tried this formula:
if(
Hasonevalue(parntername),
sum (salary),
average(salary))
But it's not working
Solved! Go to Solution.
Try using ISINSCOPE like:
Measure ISINSCOPE =
IF(
ISINSCOPE(TableName[Partnername]),
SUM(TableName[Salary]),
AVERAGE(TableName[Salary])
)
Proud to be a Super User!
Try using ISINSCOPE like:
Measure ISINSCOPE =
IF(
ISINSCOPE(TableName[Partnername]),
SUM(TableName[Salary]),
AVERAGE(TableName[Salary])
)
Proud to be a Super User!
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
Uniques =
var sumfc= sum (salary),
VAR SUMMERISE = SUMMARIZE(Partnername,Partnercountry, partnerTYPE, “Average”,sumfc)
return
IF(
OR(ISINSCOPE( 'Partnername),OR(ISINSCOPE( 'Partnercountry),ISINSCOPE(partnerTYPE))),
sum (salary),
DIVIDE(sumfc,COUNTROWS(SUMMERISE )))
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |