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.
Hi - I have seen some similar posts on this but, being fairly unfamiliar with DAX, I haven't been able to figure out how to translate it into a solution for my problem.
In short, I'm showing a weighted average for tenure by month but I want to show what the average is for the total time period shown in one graph ideally.
I tried to post a screenshot but I'm not sure if it will show up here. It's pretty simple though - I have three months ("month" variable in the axis) each showing with their own value for "weighted tenure" (placed in the value area ). I want to show those three months AND the overall average for the time period. Right now, I'm just creating two bar charts and removing the "months" from the axis so as to get the averaged total. How do I get them on the same graph?
This is one of those cases where you will have to write some DAX.
Using the CALCULATE() function in DAX you can modify the filter context.
So if you have a row showing data for a specific month you can CALUCLATE() the average for the 3 previous months, because CALCULATE allows you to use the ALL() function to temporarily remove the filter context for that row and reset it to consider the whole table, which you can then filter to get the 3 month average.
If you'd like some help writing the DAX post a small sample power bi file, or an excel file with a sample of your data.
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
Help when you know. Ask when you don't!
I created a sample pbix file but it won't let me drag and drop or copy-paste it here. how do I post it?
share via one drive ? google drive ?
Help when you know. Ask when you don't!
this is the chart in the sample
It looks like this is totaling all the data in the table
are you saying, you would like to get these counts for a specific month's worth of data, and compare it with the total for the previous 3 months ?
Help when you know. Ask when you don't!
Yeah the sample file I sent is only one day's worth of data so I couldn't show a time comparison but yes what I'm aiming for is to use the weighted tenure average measure you saw there as the value for each month (for three months in this case) and have an additional column that has the overall average for those three months. Ideally, I'd want it to be dynamic, so if I added a fourth month the overall average column would automatically update. If it helps, I can add a day of data to my test file from a different month to better show what I'm looking for.
Here's a file with two months showing in the graph. i'd want an "overall" data point in here that would be the average of the two and would change as I added or removed months to the graph.
https://drive.google.com/open?id=1auuiCQ6hmgu1r7c7WZCEw4NV96Ft99TN
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |