Forum Discussion
bowz1977
3 years agoNew Member
How To Remove Empty Quarter From Chart Chart
I have a measure setup to calculate the Margin % that i've charted out, the data does not start until 6/2021. How do I get the chart to start at 6/1 (Q2) vs. Q1 so I don't have Q1 showing up with...
- 3 years ago
Try rewriting the measure like this:
Margin % = DIVIDE ( SUM ( 'TABLE'[ExtendedSell] ) - SUM ( 'TABLE'[ExtendedCost] ), SUM ( 'TABLE'[ExtendedSell] ) )Hardcoding "1" in the measure prevents the suppression of blank if the DIVIDE expression returns blank.
A more performant version of this measure uses a variable:
Margin % = VAR vExtendedSell = SUM ( 'TABLE'[ExtendedSell] ) VAR vResult = DIVIDE ( vExtendedSell - SUM ( 'TABLE'[ExtendedCost] ), vExtendedSell ) RETURN vResult
DataInsights
3 years agoSuper User
Try rewriting the measure like this:
Margin % =
DIVIDE (
SUM ( 'TABLE'[ExtendedSell] ) - SUM ( 'TABLE'[ExtendedCost] ),
SUM ( 'TABLE'[ExtendedSell] )
)
Hardcoding "1" in the measure prevents the suppression of blank if the DIVIDE expression returns blank.
A more performant version of this measure uses a variable:
Margin % =
VAR vExtendedSell =
SUM ( 'TABLE'[ExtendedSell] )
VAR vResult =
DIVIDE ( vExtendedSell - SUM ( 'TABLE'[ExtendedCost] ), vExtendedSell )
RETURN
vResult
- bowz19773 years agoNew Member
Thanks for the quick help! Worked!