Forum Discussion

jobf's avatar
jobf
Helper II
8 months ago
Solved

Avoid repeating data in the tables.

See the table below:   This is a table I created from some data from the visual. The first part consists of the data that was planned for each plot. The second part (from the "start of period...
  • srlabhe's avatar
    8 months ago
    Create a new column or measure that conditionally returns a blank.
    • For a Table/Matrix: Use DAX to check against the previous row's value within the same group.
      dax
      Planned Data Display =
      VAR CurrentPlot = 'YourTable'[PlotID]
      VAR CurrentValue = 'YourTable'[Planned Data]
      VAR PreviousValue =
          LOOKUPVALUE(
              'YourTable'[Planned Data],
              'YourTable'[PlotID], CurrentPlot,
              'YourTable'[Start of Period], EARLIER('YourTable'[Start of Period]) - 1 // Or similar logic to find previous row in group
          )
      RETURN
          IF(CurrentValue = PreviousValue, BLANK(), CurrentValue)
      This gets complex with dates/sequences, a simpler check for immediate repeats is: IF(EARLIER('YourTable'[Planned Data]) = 'YourTable'[Planned Data], BLANK(), 'YourTable'[Planned Data]) if data is perfectly sorted.