Forum Discussion

ikarouscb's avatar
ikarouscb
Frequent Visitor
2 years ago
Solved

How to repeat the last date value in Matrix when null value is calculated

Hello Dear Comunity   i have the following issue    Desired Result calculated on Excel manually (color Orange is marking every time the value changes on the same line from previous column) ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ikarouscb ,

     

    Your two screenshots in message1 are very blurry and I can't make out the results you are expecting.

     

    Would you be able to provide the pbix file with the sensitive data removed to better help you with your problem.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ikarouscb ,

     

    1. Create a calculation table and create a relationship with the original table.

    Table =
    CALENDARAUTO()

     

    Table 2 =
    DISTINCT('Data Base'[PARTNO])

     

     

    2. Create a measure and fill in the data that was originally empty.

    Measure 3 =
    VAR_sum =
    SUM ( 'Data Base'[OnlyNeg2 cn Dup] )
    VAR_date =
    CALCULATE (
    MAX ('Data Base'[ADJ DATE]),
    FILTER (
    ALL ( 'Data Base' ),
    _sum = BLANK ()
    && 'Data Base'[PARTNO] = MAX ( 'Table 2'[PARTNO] )
    && 'Data Base'[ADJ DATE] <= MAX ( 'Table'[Date] )
    )
    )
    VAR_blank=
    CALCULATE (
    MAX ( 'Data Base'[OnlyNeg2 cn Dup] ),
    FILTER (
    ALL('Data Base'),
    'Data Base'[ADJ DATE] = _date
    && 'Data Base'[PARTNO] = MAX ( 'Table 2'[PARTNO] )
    )
    )
    RETURN
    IF ( _sum = BLANK (), _blank, _sum )

     

    3. Create measure so that the correct total is displayed in the matrix.

    Measure 4 =
    IF (
    ISINSCOPE ( 'Table 2'[PARTNO] ),
    'Data Base'[Measure 3],
    SUMX ( ALL ( 'Table 2' ), 'Data Base'[Measure 3] )
    )

     

    4. Use new fields to display in the matrix. For more details, please view the pbix attachment.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • ikarouscb's avatar
    ikarouscb
    2 years ago

    Thank you very Much Anonymous  this solved the issue!! i really apreaciate! that was awsome!!!!