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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
masplin
Impactful Individual
Impactful Individual

Unexpected behaviour of Calculation item from Tabular Editor

I have a date table and each date is labelled as "Actual" yes or no before or after the last transaction

 

I ussed tabular editor to create

 

Current Month = 

SELECTEDMEASURE()

Prev month= 

CALCULATE(SELECTEDMEASURE(), DATEADD('DateTable'[Date],-1,MONTH))

 

I have a measure

 

Days in Period = CALCULATE(
                    CALCULATE(COUNTROWS(DateTable),
                        FILTER(DateTable,DateTable[Date]<=[Last Enquiry Date])
                           )
                          )
and
 
Total Days in Period = CALCULATE(COUNTROWS(DateTable),ALL(DateTable[Actual]))
 
so days in period/total days in period is 100% for all previous months and X% for the current month. 
 
In my report i have Actual filtered on "yes" and have selected Jun23
 
Capture.JPG
 
Current month correctly calcuates 30 days in June if you remove the [actual] filter, but May says 22 instaead of 31?  If I remove the report filter for actuals Prem month days in period and total days both say 31. So it seems if i do ALL([Actual] using the report filter it generates right number (31), but not if the ALL is inside the measure?
 
I assume it is something to do with the DATEADD bit is overriding the ALL, inside the measure, with the 22 days of Jun.
 
I tried to make a very simple workbook with just these dates, but oddly my Prem Month calcuation item isnt producing any answer. I have no idea why, but the book is here. Test 
 
Any ideas appreciated
 
mike
0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.