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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Shelley
Continued Contributor
Continued Contributor

Why Won't All of My Calculated Expressions Display in the Line Chart?

I am using two flags on my calendar. One to flag all dates in the maximim fiscal year and the second to flag all dates in the maximum fiscal year -1:

 

Max FY Flag = IF(Daily_Calendar[Fiscal_Year] = [Max Data FY], 1, 0)

Max FY-1 Flag = IF(Daily_Calendar[Fiscal_Year] = [Max Data FY] - 1, 1, 0)

 

I am then calculating these cumulative expressions for Max Yr Actual Gross Margin, Max Yr Plan Gross Margin and Max Yr-1 Actual Gross Margin (Our fiscal year begins in October:

 

Max Fiscal Year GM $ =
CALCULATE ('Field Dashboard GM Data'[Total Actual GM $], FILTER(ALL(Daily_Calendar), 
 Daily_Calendar[Max FY Flag] = 1 && 
 Daily_Calendar[Fiscal_Year] = MAX('Field Dashboard GM Data'[Fiscal Year]) && 
 Daily_Calendar[Fiscal_Month] <= MAX('Field Dashboard GM Data'[Fiscal Month])))

 

Max Fiscal Year GM Plan =
CALCULATE ('Field Dashboard GM Data'[Total AOP GM $], FILTER(ALL(Daily_Calendar), 
 Daily_Calendar[Max FY Flag] = 1 && 
 Daily_Calendar[Fiscal_Year] = MAX('Field Dashboard GM Data'[Fiscal Year]) && 
 Daily_Calendar[Fiscal_Month] <= MAX('Field Dashboard GM Data'[Fiscal Month])))

Max Fiscal Year-1 GM $ =
CALCULATE ('Field Dashboard GM Data'[Total Actual GM $], FILTER(ALL(Daily_Calendar), 
 Daily_Calendar[Max FY-1 Flag] = 1 && 
 Daily_Calendar[Fiscal_Year] = MAX('Field Dashboard GM Data'[Fiscal Year]) && 
 Daily_Calendar[Fiscal_Month] <= MAX('Field Dashboard GM Data'[Fiscal Month])))

 

When I try to show these in a line graph, the Max Yr-1 Actual Gross Margin will not show. It is calculating properly, but why won't it show??? Please help. I'd be happy to share the pbix file, but cannot attach it here.

 

Capture3.PNG

3 REPLIES 3
Shelley
Continued Contributor
Continued Contributor

I think we figured out what is going on, but now we cannot figure out how to address it. It appears that for some reason Power BI is seeing the results of this expression as text. Why? It uses the same exact measure and same type of flag formula to calculate it as one of the other fields. See how the other fields will total at the bottom of the table? This column does not total, which is what leads us to believe Power BI is treating it as text. Is this a bug? What the heck is going on? Are we doing something wrong?

Capture.PNG

SivaMani
Resident Rockstar
Resident Rockstar

@Shelley

It's supposed to show if you don't apply any filter on Fiscal Year

Shelley
Continued Contributor
Continued Contributor

Yes, there are no filters on any years.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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