Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to show selected date and pervious date data

Dear 

 

If i choose date from Filter then i want to show selected date data and pervious date data 

 

For example

 

if i choose 22-03-2020 then i want to show 22nd  and 21st data separte, right now i can get only which i selected date data 

 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago
    Dear, I have found myself, i created two measures and its worked perfectly. Current CCBM = VAR COne = If (Contains (MeasureBy,MeasureBy[Selection],"CBM-EQ") = TRUE() , CALCULATE(sum(prod_day_analy_rpt_bi[CBM]),FILTER(Proddate,Proddate[Proddt])), BLANK() ) Previous PreviousData = VAR PCBMOne = If (Contains (MeasureBy,MeasureBy[Selection],"CBM-EQ") = TRUE() , CALCULATE(sum(prod_day_analy_rpt_bi[CBM]),PREVIOUSDAY(Proddate[Proddt])) , BLANK() )

3 Replies

  • dax's avatar
    dax
    Community Support

    Hi Anonymous , 

    You need to create a slicer which doesn't have relationship between fact table, you could refer to my sample for details.

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable
      Dear, I have found myself, i created two measures and its worked perfectly. Current CCBM = VAR COne = If (Contains (MeasureBy,MeasureBy[Selection],"CBM-EQ") = TRUE() , CALCULATE(sum(prod_day_analy_rpt_bi[CBM]),FILTER(Proddate,Proddate[Proddt])), BLANK() ) Previous PreviousData = VAR PCBMOne = If (Contains (MeasureBy,MeasureBy[Selection],"CBM-EQ") = TRUE() , CALCULATE(sum(prod_day_analy_rpt_bi[CBM]),PREVIOUSDAY(Proddate[Proddt])) , BLANK() )