Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

measure adjusting start date

Hi all,

 

I have a visual (if you can call it even a proper visual... :)) that looks as followed.

 

 

 

The red line starts from the start date of the 'Calendar'. I would like to however let it automatically start from the period when there are actuals (for every project this is different), I am just not sure how to do that.
 
Total budget release = calculate(sum('LE 2022'[Budget release/LIP]),ALL('Calendar'))
 
Perhaps worth to share is :
actuals (yellow bars) are specifically linked in my date model to a month. While the total budget release (red line) is not linked to a month, but to a specific year.
 
Any idea on how make it a proper visual 🙂 ?
  • Hi,

    Your budget measure should be:

    Total budget release = if(isblank([Actuals]),blank(),sum('LE 2022'[Budget release/LIP]))

    Hope this helps.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I'm not clear about your requirement. Do you want to show the red line start from the date which the yellow bar starts with the culmulative values? If yes, you can update the formula of measure [Total budget release] as below:

    Total budget release =
    VAR _mindate =
        MINX ( ALLSELECTED ( 'LE 2022' ), 'LE 2022'[Date] )
    VAR _maxdate =
        MAXX ( ALLSELECTED ( 'LE 2022' ), 'LE 2022'[Date] )
    VAR _seldate =
        SELECTEDVALUE ( 'Calendar'[Date] )
    RETURN
        IF (
            _seldate >= _mindate
                && _seldate <= _maxdate,
            CALCULATE (
                SUM ( 'LE 2022'[Budget release/LIP] ),
                FILTER ( ALLSELECTED ( 'LE 2022' ), 'LE 2022'[Date] <= _seldate )
            ),
            BLANK ()
        )

    If the above one can't help you, could you please provide some raw data in your table 'LE 2022' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

    How to provide sample data in the Power BI Forum

     

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards

  • Hi,

    Your budget measure should be:

    Total budget release = if(isblank([Actuals]),blank(),sum('LE 2022'[Budget release/LIP]))

    Hope this helps.