cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

@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
User Groups Public Preview

Join us for our User Group Public Preview!

Power BI User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.