The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm having a very weird issue with SUMX and date filters.
The current formula I am using is as follows:
RunTimeTest2 = SUMX('Date', MAX(DataPartCell1[ShiftHour]) - MIN(DataPartCell1[ShiftHour]))
The values shown (22.92 and 13.17) are correct, the total is not. I have 2 days selected so the total is 2022-01-27*2 = 22.92*2 = 45.83
How can I fix this? I'm kind of stumped here.
Solved! Go to Solution.
I was able to solve this following this guide:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Using two measures, the first one being:
RunTimeTest2 = SUMX('Date', MAX(DataPartCell1[ShiftHour]) - MIN(DataPartCell1[ShiftHour]))
The second one being:
ActualRuntime =
VAR __table = SUMMARIZE('Date',[Date],"__value",[RunTimeTest2])
RETURN
IF(HASONEVALUE('Date'[Date]),[RunTimeTest2],SUMX(__table,[__value]))
Hi,
This is a common issue and it has to do with the way totals work on visualizations. I recommend cheking this post by SQLBI to understand what is going on: https://www.sqlbi.com/articles/summing-values-for-the-total/
Proud to be a Super User!
I was able to solve this following this guide:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Using two measures, the first one being:
RunTimeTest2 = SUMX('Date', MAX(DataPartCell1[ShiftHour]) - MIN(DataPartCell1[ShiftHour]))
The second one being:
ActualRuntime =
VAR __table = SUMMARIZE('Date',[Date],"__value",[RunTimeTest2])
RETURN
IF(HASONEVALUE('Date'[Date]),[RunTimeTest2],SUMX(__table,[__value]))
User | Count |
---|---|
24 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
29 | |
13 | |
11 | |
10 | |
9 |