Forum Discussion
powerbinoobster
3 years agoHelper I
Stop Line Graph from extending after the last data point?
I created a measure that calucales the running toal of my data. Count of Status YTD =
IF(
ISFILTERED('ECO'[Date Originated]),
ERROR("Time intelligence quick measures can only be grouped or filte...
- 3 years ago
Hey VahidDM,
Your solution was almost there. You missed the .[DATE] in the last IF. Also, if I have data in the month of septemebr, my line graph would stop at August. So what I did was add +30 to TODAY() and now it includes the data for septemeber.
Count of Status YTD =VAR _A =IF (ISFILTERED ( 'ECO'[Date Originated] ),ERROR ( "Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column." ),TOTALYTD ( COUNTA ( 'ECO'[Status] ), 'ECO'[Date Originated].[Date] ))RETURNIF ( MAX ( 'ECO'[Date Originated].[Date] ) > TODAY() + 30, BLANK (), _A )
VahidDM
3 years agoSuper User
Check this code:
Count of Status YTD =
VAR _A =
IF (
ISFILTERED ( 'ECO'[Date Originated] ),
ERROR ( "Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column." ),
TOTALYTD ( COUNTA ( 'ECO'[Status] ), 'ECO'[Date Originated].[Date] )
)
RETURN
IF ( MAX ( 'ECO'[Date Originated] ) > TODAY (), BLANK (), _A )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
powerbinoobster
3 years agoHelper I
Hey VahidDM,
Your solution was almost there. You missed the .[DATE] in the last IF. Also, if I have data in the month of septemebr, my line graph would stop at August. So what I did was add +30 to TODAY() and now it includes the data for septemeber.
Count of Status YTD =
VAR _A =
IF (
ISFILTERED ( 'ECO'[Date Originated] ),
ERROR ( "Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column." ),
TOTALYTD ( COUNTA ( 'ECO'[Status] ), 'ECO'[Date Originated].[Date] )
)
RETURN
IF ( MAX ( 'ECO'[Date Originated].[Date] ) > TODAY() + 30, BLANK (), _A )