Forum Discussion
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
- Anonymous6 years agoDear, 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
- Greg_DecklerCommunity Champion
First, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Second, you can generally work around these kinds of issues by using something like ALL, ALLEXCEPT or REMOVEFILTERS and then filtering back down to what you want.
- daxCommunity 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 ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicableDear, 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() )