Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello, I finally achieved a decent merge of source files into one table, which looks similar to the following table. Each row represent 1 server. I need to produce a table showing something like the 2nd table below (The Average is exactly the average of daily entries during the selected month; Max is the maximum daily entries for the selected month.)
I tried with Summarizing categories (one summary for OS, another for Role) and achieved AVG, but then I am not able to put them together in one single table. On the Max calculation I am completely lost. I am totally newbie
Date | OS | Role |
12 march 2024 | linux | oracle |
13 march 2024 | windows | oracle |
14 march 2024 | windows | oracle |
14 march 2024 | linux | oracle |
14 march 2024 | linux | sql |
1 april 2024 | linux | sql |
1 april 2024 | windows | sql |
1 april 2024 | linux | sql |
1 april 2024 | windows | sql |
1 april 2024 | linux | sql |
1 april 2024 | windows | sql |
1 april 2024 | linux | oracle |
02-may-24 | linux | oracle |
02-may-24 | windows | oracle |
Month | Average | Max |
Linux | ||
Windows | ||
Oracle | ||
SQL | ||
ALL servers |
Solved! Go to Solution.
Hi,
OK please try the following.
1. Create a date table and join to the data table for filtering.
2. Add a month column to the date table using the FORMAT function. Add month as slicer.
3. Create 1st measure : (For ORACLE ONLY)
4. Create 2nd measure:
So using March and Oracle in your example gives me 2 because there are 2 dates with "Oracle" and thats the highest number. See screenshot.
Hope this helps. Let me know either way.
Hi @pasqualino,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and Accept it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Regards ,
Harshitha.
Hi,
The very first action you must perform on your dataset is "Unpivot Other Columns" in Power Query. For help on the result, for the sample table that you have shared, show the expected result.
Hi,
OK please try the following.
1. Create a date table and join to the data table for filtering.
2. Add a month column to the date table using the FORMAT function. Add month as slicer.
3. Create 1st measure : (For ORACLE ONLY)
4. Create 2nd measure:
So using March and Oracle in your example gives me 2 because there are 2 dates with "Oracle" and thats the highest number. See screenshot.
Hope this helps. Let me know either way.
Thanks a lot @m4ni I succeeded in creating date table, I am now struggling with the Daily count as it is returning the same value if I filter for Oracle, Sql or any other value I have in my tables 😕
Hi @pasqualino
The reason for incorrect values is likely because you dont have a unique key in your table therefore the records are getting grouped. Please try these steps:
1. Go into Power Query and add an Index column from 1
2. Amend the Count Per Day measure to now summarize by Index rather than OS.
This should give you correct results as you now have uniqueness due to Index.
Please confirm how you wish to display the results. If you want to display the max value in a seperate card visual then you need to filter Count Per Day measure for either "sql", "oracle" or other values.
If you want to display the max value in a table then you can take out the filter on role.
Screenshot should help make sense...
Could you please help me with the date table and join? I already have date on each data table row, is it a must to have a separate table?
The date table is a must, yes. Firstly its best practice and secondly, in your example using the data table gives wrong results (I tested that), because you dont have unique values.
However if you want to know the workaround, please amend the second measure to:
I feel you need to re-evaluate what exactly you are trying to measure. What is it you are trying to average? What is it you are trying to find the MAX of?
Your description tells me it is counts of enteries per day but summarized by month. Worth just clarifying..
hello @m4ni my apologies for the unclear explanation. Yes, I want to count all the appearances of Oracle, for instance and return: how many oracle there were on average on the chosen month? What was the highest volume (daily based) on a selected month?
Hi @pasqualino ,
Great job on merging your data so far! To achieve a table that shows both the Average and Max values by OS (or Role), you’ll need to use measures in Power BI and display them together in a matrix or table visual. Here’s a simple step-by-step guide:
Go to your table in Power BI and create two new measures:
Average:
Average Value = AVERAGE('YourTable'[ValueColumn])
Max:
Max Value = MAX('YourTable'[ValueColumn])
Replace [ValueColumn] with the column you want to aggregate (e.g., daily entries/count).
This will create a table with each OS (or Role) and display both Average and Max for each.
If you want to see these by month:
To get an "ALL servers" row, the matrix/table visual will automatically aggregate across all OS/roles (the Grand Total).
If you need help with the exact DAX or have a specific column name, just let me know! Screenshots or your sample data are always welcome.
You’re on the right track—let me know if you need a step-by-step with screenshots!
translation and formatting supported by AI
thanks a lot @burakkaragoz I think I succeeded with AVG, I am, on the other side, struggling with MAX calculation.
I have added a column for each of the categories I am exploring, setting it to 1 or 0.
I set measures to
Hi @pasqualino,
Thank you @burakkaragoz , for your reply regarding query.
Using CALCULATE ensures it respects the filters from your visual, like slicers or matrix rows/columns for month or category. Also, make sure you're using a proper Date field from a calendar table to slice the data by month.
Try updating your measure like this:
Max DB2 in a Month =
CALCULATE(
MAX(Consulta1[Count DB2])
)
please find the attached screenshot and pbix file for your reference
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it
Best Regards,
Harshitha.
Community Support Team
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
66 | |
61 | |
46 | |
45 |