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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
masplin
Impactful Individual
Impactful Individual

Formula with different result in Desktop than Excel 2016

I have bene transcribing my Excel modle inot Desktop assumnig DAX works exactly the same.  I have a calcaution for working out how many working days there are in a period. It varies slightly by Centre because we areo pening new centres so has to take account of opening date.

 

My measure is

 

=CALCULATE(
CALCULATE(
COUNTROWS(DateTable),
FILTER(
DateTable,
DateTable[Closed for Business]=blank() &&
DateTable[Day]<=
CALCULATE(MAX('Posted Document Header'[Posting Date])) &&
DateTable[Day]>=MIN('Centre'[Opening Date])
)
),
ALLEXCEPT('Posted Document Header',Centre,DateTable)
)

 

This works correctly in excel returning 26 days in Jun no matter waht other slicers I have or rows on pivot as below

 

 Jun-17  
Type/Source/CampCar Count per DayCar CountDays in Period
WORD OF MOUTH0.08226
SOCIAL MEDIA  26
SIGNAGE2.466426
REPEAT CUSTOMER0.812126
OTHER0.04126
DIGITAL2.195726
DEAL SITE  26
AFFILIATE0.23626
ADVERTISING0.04126
Grand Total5.8515226

 

However I have copied everythnig idneitcally to Desktop and get this

 

Capture.PNG

 

So it is passing the marketing fields into the calculation. For example Word of Mouth we had 2 visits on 26th and 30th june.

 

First question is why does this work fine in Excel and not in Desktop?

 

Secondly how do I fix it as pretty sure my ALLEXCEPT statement is correct!!!!!

 

Pretty worrrying as i have hundered of measures that are fully tested, but I havent retested all of them in Desktop

 

Thanks

Mike

1 ACCEPTED SOLUTION
masplin
Impactful Individual
Impactful Individual

Found it. Somehow managed to add a bracket in fornt of MIN and Desktop automatically added a bracket at the end instead of just giving an error.

View solution in original post

1 REPLY 1
masplin
Impactful Individual
Impactful Individual

Found it. Somehow managed to add a bracket in fornt of MIN and Desktop automatically added a bracket at the end instead of just giving an error.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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