Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have this great measure for calculating the number of hours per week based on a date range (which works really well and was lovingly helped by you guys)
However, subtotalling doesnt work so there must be something in DAX formula to adjust and I cant figure it out. I am very wary of adjusting this formula as it was a nightmare to write!! As you can see the subtotal should be 102.88hrs, but is showing as 68.59hrs. perhaps I need another measure to subtotal this measure?
Any help gratefully received 🙂
Solved! Go to Solution.
Hi @Dazzlerdb ,
Base on your description, it seems like you got the incorrect total values in your matrix visual. You can create another new measure as below to replace the original measure [WeekHrs], put the fields in below screenshot in groupby part:
Measure =
SUMX (
GROUPBY (
'RPPlan',
'RPPlan'[Project],
'RPPlan'[field2],
'RPPlan'[field3],
'RPPlan'[field4],
'RPPlan'[field5],
'RPPlan'[field6],
'RPPlan'[StartDate],
'RPPlan'[EndDate],
'RPPlan'[Hrs Per Day],
'RPPlan'[xxhours]
),
[WeekHrs]
)
In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Dazzlerdb ,
Base on your description, it seems like you got the incorrect total values in your matrix visual. You can create another new measure as below to replace the original measure [WeekHrs], put the fields in below screenshot in groupby part:
Measure =
SUMX (
GROUPBY (
'RPPlan',
'RPPlan'[Project],
'RPPlan'[field2],
'RPPlan'[field3],
'RPPlan'[field4],
'RPPlan'[field5],
'RPPlan'[field6],
'RPPlan'[StartDate],
'RPPlan'[EndDate],
'RPPlan'[Hrs Per Day],
'RPPlan'[xxhours]
),
[WeekHrs]
)
In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
define "doesn't work". Are you trying to subtotal by rep? If so then that field need to be included in the SUMMARIZECOLUMNS.
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |