Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
kmes912
Helper I
Helper I

Previous Month Works for Certain Rows, But Some are Blank, Total is Correct

When looking at the summary matrix, the values are different than when I show the department matrix showing details.

 

Visual 1 shows correct and totals are correct at -598, but the details of the depts is not correct. The slicer is March to get this view which woudl be of February.

kmes912_0-1617931238443.png

Fact Table 1 Showing P&L

kmes912_1-1617931288139.png

Fact Table 2 Showing ATLAS

kmes912_2-1617931346207.png

 

They are joined to a DEPT table, a DATE table and a UNIT table dimensionally. All are the same types/formats.

 

When I try to do PREVIOUSMONTH, it works for some, but not 0431, which is why the issue is coming up re the total vs the dept details. The below matrix has no filter on it except the unit. How does it have 852, 614, 545 but can't give it for prior P&L?

 

kmes912_3-1617931397233.png

 

I've tried both DATEADD and PREVIOUSMONTH and am still getting blanks for 0431 despite the fact that i can see the values in the "P&L column"

Contract Hours P&L Prior = CALCULATE([Contract Hours P&L],DATEADD('01 Lookup Date'[Date],-1,MONTH))
Contract Hours ATLAS Prior = CALCULATE([Contract Hours ATLAS],PREVIOUSMONTH('01 Lookup Date'[Date]))
Contract Hours P&L = CALCULATE(SUMX('Table 09','Table 09'[Value]),'Table 09'[Worker Type]="Contract")
Contract Hours ATLAS = CALCULATE(SUM('03 Table'[Regular Hours]),'03 Table'[Class]="Contract")
3 REPLIES 3
amitchandak
Super User
Super User

@kmes912 , Is '01 Lookup Date' is a date table and also marked as date table in power bi (Right click)

 

Check 5 reason why TI fails - https://www.youtube.com/watch?v=OBf0rjpp5Hw

Any ideas? @amitchandak 

@amitchandak Yes it is marked as a date table. So bizarre that it shows for the other departments but not this one. I verified that 0431 exists on both the fact and dimensions tables.  I dont get how it can pull current month fine but when you refer to prior works for certain depts but not for all.

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors