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
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
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.