Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to return the value only of table cell data

Hello World,

 

I am working on creating an inventory visual that shows the levels of stock in our warehouse. The issue I am facing is the data adds multiple dates then returns the value.

 

Example: 

3/28   5 units

3/29   5 units

3/30   6 units

 

What ends up happening is the return is usually all the units combined when I am doing it by month & year date filter. However only one addition unit was added to the warehouse and I only want it to show we have 6 units and not 16.

 

I figure I would need to calulate then filter the data by dates but not sure exactly what else I may need. If this has been posted already, please point me in that direction or if you could assist with solving I would appreciate.

 

  • So you want the latest number of units? Then you'll likely want a measure similar to this:

    Units =
    VAR _MaxDate = MAX ( Table1[Date] )
    RETURN
        CALCULATE ( SUM ( Table1[Units] ), Table1[Date] = _MaxDate )

3 Replies

  • So you want the latest number of units? Then you'll likely want a measure similar to this:

    Units =
    VAR _MaxDate = MAX ( Table1[Date] )
    RETURN
        CALCULATE ( SUM ( Table1[Units] ), Table1[Date] = _MaxDate )
    • Anonymous's avatar
      Anonymous
      Not applicable

      AlexisOlson 

       

      I am going to text this out and get back to you if this solves it. Thanks for the help

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks a lot for the help.