Forum Discussion
kulpowerbi
4 years agoHelper I
Calculate function is showing same value for each axis
Please help me to understand what's wrong with this. I am trying to filter simple measure like sum measure with calcualte and it should return the value for only suppose year 2019. I have my cal...
ryan_mayu
4 years agoSuper User
pls try
M_year=CALCULATE([M_PAF_FromTo], FILTER('Calendar Table','Calendar Table'[Year]=2019))
kulpowerbi
4 years agoHelper I
parry2k ryan_mayu Greg_Deckler amitchandak
I have already tried. Filter inside my dax. WHile debuging I only found the issue of AND function here.. If i put 1=1 in true function or any thing wihout measure in left side then the result is showing value for only 2015 while year hirachy is showig in chart.
M_Sales_dynamic date range for each Bookmark =
//IF([M_Bookmark_Selection]="1", CALCULATE(Sales[Sales],FILTER('Calendar','Calendar'[Year]=2015)),0)
IF(AND([M_Bookmark_Selection]="1", [Slider_Min_Max_Date]="T"), CALCULATE(Sales[Sales],FILTER('Calendar','Calendar'[Year]=2015)),
IF(AND([M_Bookmark_Selection]="2", [Slider_Min_Max_Date]="T"), CALCULATE(Sales[Sales],FILTER('Calendar','Calendar'[Quarter]="Q2")),
IF(AND([M_Bookmark_Selection]="3", [Slider_Min_Max_Date]="T"), CALCULATE(Sales[Sales],FILTER('Calendar','Calendar'[Month]="May")),
CALCULATE(Sales[Sales],FILTER('Calendar','Calendar'[WeekdayNum]=1)))))My data is not matching pleas see below screenshot and PowerbI file.