Forum Discussion
EnrichedUser
Helper III
3 years agoIncorrect Column Total: Row/Grand Totals are good
Hi All, I have found my most bizzare case in Power BI yet and would love some help. My measure is returning correctly for each row, but fails when calculating the column totals. For sake of debugg...
Ashish_Mathur
Super User
3 years agoHi,
Share the download link of the PBI file.
EnrichedUser
Helper III
3 years agoI am unfortunally not able to at this time. But the model is extremely simple.
There is only two tables and both are included below.
Receipts:
| Eff Date | Quantity | Site_Item_Key |
| 3/13/2023 | 100 | SFA250 |
| 3/31/2023 | 100 | SFA250 |
| 6/26/2023 | 100 | SFA250 |
| 1/12/2023 | 6 | SFA479 |
| 4/3/2023 | 10 | SFA479 |
| 5/11/2023 | 10 | SFA479 |
| 6/22/2023 | 305 | SFA479 |
Date:
Date =
ADDCOLUMNS (
CALENDAR ( DATE(2023,1,1), DATE(2023,12,31) ),
"Year", YEAR ( [Date] ),
"Month", FORMAT ( [Date], "MMM" ),
"Month No", MONTH ( [Date] ),
"Quarter", "Q" & CEILING ( MONTH ( [Date] ) / 3, 1 ),
"Week No", WEEKNUM ( [Date] ),
"Weekday", FORMAT ( [Date], "dddd" ),
"Weekday No", WEEKDAY ( [Date], 2 ) + 1,
"Year Month", FORMAT ( [Date], "MMM yyyy" ),
"Month Year No", YEAR ( [Date] ) * 100 + MONTH ( [Date] ),
"Week Year", YEAR ( [Date] ) * 100 + WEEKNUM ( [Date] ),
"Month Sort", YEAR ( [Date] ) * 10000 + MONTH ( [Date] ),
"Week Sort", YEAR ( [Date] ) * 10000 + WEEKNUM ( [Date] )
)