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 select Date 2 Slicer then Category of that particular ID and RO Value should be captured.

Delta should be processded R&O value at Date2 - R&O value at Date1

 

INPUT

DATEIDCategoryR&O Value
1-Nov-23RO12BLUE100
1-Nov-23RO13CLOSED0
1-Nov-23RO14BLUE200
1-Nov-23RO15IMPLEMENTED0
2-Nov-23RO12BLUE200
2-Nov-23RO13BLUE100
2-Nov-23RO14BLUE200
2-Nov-23RO15BLUE300
3-Nov-23RO12CLOSED0
3-Nov-23RO13BLUE0
3-Nov-23RO14IMPLEMENTED300
3-Nov-23RO15BLUE400
3-Nov-23RO16BLUE350

 

 

SLICER

Date1 -SLICERDate2-SLICER
1-Nov-233-Nov-23

 

OUTPUT

IDCategory at Date1Category at Date2R&O value at Date1R&O value at Date2Delta
RO12BLUECLOSED1000-100
RO13CLOSEDBLUE000
RO14BLUEIMPLEMENTED200300100
RO15IMPLEMENTEDBLUE0400400
RO16 BLUE0350350

 

Regards

Reddy.

 

 

  • 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')
    )

5 Replies

    • tangutoori's avatar
      tangutoori
      Helper III

      Dear Gosbell,

       

      thankyou somuch for your support.

      Am facing the below error. which version you have used to developed this soolution. as now am using Report Server vesion Jan2023

      Please let me know how can i opne the file.

       

      Regards,

      Reddy.

       

  • 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')
    )
    • tangutoori's avatar
      tangutoori
      Helper III

      all working fine, but when i remove ID all values are showign 0. can we show those values with out ID column ?