Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Source table:
ID | Date | WeekNum | Pageview |
A | Jul 27 2020 | 31 | 100 |
A | Jul 23 2020 | 30 | 200 |
A | Aug 4 2020 | 32 | 300 |
B | Jul 23 2020 | 30 | 333 |
B | Jul 27 2020 | 31 | 111 |
B | Jul 27 2020 | 31 | 111 |
Then I created a dynamic table by summarize ():
ID | WeekNum | Weekly total | % difference vs last week |
A | 30 | 200 | 0 |
A | 31 | 100 | -50% |
A | 32 | 500 | 400% |
B | 30 | 333 | 0 |
B | 31 | 222 | -33.3% |
I was able to use Matrix table to show this, but I now want to use avg weekly % change to display with other chart visual like above, how could I extract the 'weekly% change' per ID?
ID | 31 % change | 32 % change | total (avg) |
A | -50 | 400 | 175% |
B | 0 | -33.3% | -33.3% |
i.e. Is there any way to get avg % not using Matrix, and make the 'avg of weekly % change' usage in other chart?
ID | Avg of weekly % change |
A | 175% |
B | -33.3% |
Solved! Go to Solution.
@Anonymous - Yes, you can do it all dynamically in variables in DAX. For example here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
You can use something like:
VAR __Table = ADDCOLUMNS(SUMMARIZE(....),"% change", <calc goes here>)
Thanks both, i eventually figured out my ans below:
@Anonymous - Yes, you can do it all dynamically in variables in DAX. For example here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
You can use something like:
VAR __Table = ADDCOLUMNS(SUMMARIZE(....),"% change", <calc goes here>)
@Anonymous , refer if my WOW blog can help
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |