Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi, I'm pretty new to power bi and dax, but haven't had luck with finding an example that fits what I'm trying to do.
I'm trying to get the following - I've created a new measure as shown in the image below. I've put the results into a matrix with Event as columns and Team as rows and the values come out fine, however what I want for the total column for each team is the Average of Events as opposed to performing the measure without respect to the events.
I think I need some combination of Calculate, Group By or summarize, but I haven't been able to wrap my head around how to get what I want. Any help would be welcome!
Solved! Go to Solution.
Hi @Anonymous,
Create the following two measures:
Percent_Team =
DIVIDE ( SUM ( 'Table'[T1] ); SUM ( 'Table'[T1] ) + SUM ( 'Table'[T2] ) )
Total Percent =
IF (
HASONEVALUE ( 'Table'[Event] );
[Percent_Team];
AVERAGEX (
SUMMARIZE (
'Table';
'Table'[Team];
'Table'[Event];
"Average_Total"; [Percent_Team]
);
[Average_Total]
)
)
Then use your second measure to create your table visual:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
Create the following two measures:
Percent_Team =
DIVIDE ( SUM ( 'Table'[T1] ); SUM ( 'Table'[T1] ) + SUM ( 'Table'[T2] ) )
Total Percent =
IF (
HASONEVALUE ( 'Table'[Event] );
[Percent_Team];
AVERAGEX (
SUMMARIZE (
'Table';
'Table'[Team];
'Table'[Event];
"Average_Total"; [Percent_Team]
);
[Average_Total]
)
)
Then use your second measure to create your table visual:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsPerfect, thank you!
I thought I had to do it in one stage, but this makes sense and really helps me understand the summarize function too!
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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |