Forum Discussion

tangutoori's avatar
tangutoori
Helper III
2 years ago
Solved

Capture Category as per selected date dynamically

Dear Team,   Belwo is my source data. we have two slicers, Date1 SLicer adn Date 2 Slicer. When i select Date 1 Slicer then Category of that particular ID and RO Value should be captured. When i ...
  • d_gosbell's avatar
    2 years ago

    Sorry I don't have a version of Desktop that is that old. But my data model is pretty simple

     

     

    I made the relationship to Calendar2 inactive.

     

    Then the technique I used with the "Date2" measures was the following pattern

     

    Category at Date2 = CALCULATE(
        max( 'DataTable'[Category]),
        USERELATIONSHIP('DataTable'[DATE], Calendar2[Date])
        ,all('Calendar')
    )
     
    R&O Value at Date2 = CALCULATE(
        sum( 'DataTable'[R&O Value]),
        USERELATIONSHIP('DataTable'[DATE], Calendar2[Date]),
        ALL('Calendar')
    )