We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I have a table with two columns of data: Absenteeism and Turnover.
In the total of the Absenteeism column, the BI is bringing the average of the months. Already in the total of the Turnover column he is doing the sum.
I need him to also average the turnover and not the sum.
Can anyone help me?
Solved! Go to Solution.
@jonathanmathes , You can switch total to avg or sum depending on need using isinscope
if(isinscope(Table[Year]) && Not(Isinscope(Table[Month])) , sumx(summarize(Table, Table[Year], Table[Month], "_1", [measure]), [_1]), [Measure])
or
if(isinscope(Table[Year]) && Not(Isinscope(Table[Month])) , AverageX(summarize(Table, Table[Year], Table[Month], "_1", [measure]), [_1]), [Measure])
Hi @jonathanmathes ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
Good Morning,
Sorry for the delay, I was involved in another personal project.
I did as you said using IfInScope.
The final totalizer was OK, but the column one still adds up.
Try:
ROTavg =
IF (
ISINSCOPE ( 'Calendar'[.MesDescricao] ),
[.TurnoverPeriodo],
AVERAGEX (
SUMMARIZE (
'Calendar',
'Calendar'[.Ano],
'Calendar'[.MesDescricao],
"_1", [.TurnoverPeriodo]
),
[_1]
)
)
Proud to be a Super User!
Paul on Linkedin.
@jonathanmathes , You can switch total to avg or sum depending on need using isinscope
if(isinscope(Table[Year]) && Not(Isinscope(Table[Month])) , sumx(summarize(Table, Table[Year], Table[Month], "_1", [measure]), [_1]), [Measure])
or
if(isinscope(Table[Year]) && Not(Isinscope(Table[Month])) , AverageX(summarize(Table, Table[Year], Table[Month], "_1", [measure]), [_1]), [Measure])
I have never used isinscope, I will read about it and test it.
post the result later
Thanks
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 66 | |
| 41 | |
| 34 | |
| 25 |