Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Display filtered data simultaneously in the same column

Hi,

 

I have the following tables and slicers:

 

But I would like the Commitments to displayed as follows. But then Actuals and a bunch of other stuff are incorrect. 

 

 

How can I do this dynamically where for Commitments it selctes the lastest report run date per posting period key and displayes it togeather in the same column?

 

I have a working latest date per period measure: 

 

          Max Date =
          VAR PeriodRef = SELECTEDVALUE('Table'[Period Ref])

         RETURN
         MAXX(FILTER(ALL('Table'), 'Table'[Period Ref] = PeriodRef),
         'Table'[Report Run Date])
 
Thanks.
 
Here was my attempt to solve it:
 
       All Commitments2 =
             CALCULATE(SUM('Table'[Commitments]),
             FILTER('Table','Table'[Report Run Date] IN {[Max Date]}))
 
It some what works, because it only shows Commitments for the the lastest run dates by period. But I couldn't figure out how to correctly add to this measure to also select all the run dates. Here are the correct Commitments if I manually select all the report run date on the slicer:
 

 

 
 
 

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak,

       

      Thanks! 

       

      So I treated actuals as current year and commitments as prior years and applied your solution, here are the resutls:

       

       

      How can I edit your Dax for New Commitments, so instead of a min and max range, it selects the lastest report run date per period.

       

      For example, right now when I manually select the lastest report run dates from Commitment.reprot run date, it treats it like the min and max and also incldues March 9th, which I don't want.