Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Create dynamically calculated table based on measures to determine if FY Plan or Budget is defined

Hi   For a project portfolio, I have Plan and Budget data broken down by FY-Month and CostType. Now I need to determine whether a specific project has any Plan or Bugdet amounts in the current or p...
  • v-cherch-msft's avatar
    v-cherch-msft
    7 years ago

    Hi Anonymous

     

    You may add 4 measures first. Then you may get the table use SUMMARIZECOLUMNS Function. Here is the sample file for your reference.

    Budget18 = CALCULATE(SUM('Financial Facts'[Amount]),FILTER('Financial Facts', 'Financial Facts'[Source]="Budget"&&RELATED('Calendar'[FY])="FY18"))
    Budget19 = CALCULATE(SUM('Financial Facts'[Amount]),FILTER('Financial Facts', 'Financial Facts'[Source]="Budget"&&RELATED('Calendar'[FY])="FY19"))
    Planned18 = CALCULATE(SUM('Financial Facts'[Amount]),FILTER('Financial Facts', 'Financial Facts'[Source]="Planned"&&RELATED('Calendar'[FY])="FY18"))
    Planned19 = CALCULATE(SUM('Financial Facts'[Amount]),FILTER('Financial Facts', 'Financial Facts'[Source]="Planned"&&RELATED('Calendar'[FY])="FY19"))
    Table =
    SUMMARIZECOLUMNS (
        'Financial Facts'[PID],
        "Planned in FY18", IF ( ISBLANK ( [Planned18] ), "False", "True" ),
        "Planned in FY19", IF ( ISBLANK ( [Planned19] ), "False", "True" ),
        "Budget in FY18", IF ( ISBLANK ( [Budget18] ), "False", "True" ),
        "Budget in FY19", IF ( ISBLANK ( [Budget19] ), "False", "True" )
    )

    Regards,

    Cherie