power bi dax rules
2 TopicsCumulative Daily Average Balance
Hi In below table, How can we calculate No of Days and CDAB calculation in Power BI For Eg as on 31-May-22 SUM_Balance_FY_MONTH = SUM of balance from 1 April 2022, i.e FY 2022-2023, 3687 No of days= NO of days from Finanicial year i.e from 1April 2022 to 31-May-22 ,61 CDAB = Sum_Balance_FY_Month/No of days AS_ON_DATE BALANCE SUM_BALANCE _FY_MONTH No of Days CDAB 1-Apr-22 326 326 1 326 2-Apr-22 240 566 2 283 3-Apr-22 434 1000 3 333 4-Apr-22 309 1309 4 327 5-Apr-22 200 1509 5 302 6-Apr-22 378 1887 6 315 30-Apr-22 600 2487 30 82.9 31-May-22 1200 3687 61 60.4Solved2.3KViews0likes2CommentsCALCULATE function does not filter data
I am trying to use the CALCULATE function in DAX to find sum of income in last 12 months. The measure I am using is as below Sub measures Latest Month in Table = MAX(pbi_inc[yymm]) Samemonth_prev year = [Latest Month in Table] -100 Main DAX: income_inc= var lm = [Latest Month in Table] var r12m = [ Samemonth_prev year] return CALCULATE(SUM(pbi_inc[inc], pbi_inc[ic/cr] =1,pbi_inc[yymm] >=lm , pbi_inc[yymm] <=r12m) The issue I am facing is the Calculate function is not filtering data for yymm. It filters data when I change the ic/cr value but not for yymm. It works fine when I hardcode to something like 2112 but not when I use variables and submeasures. I have compared the data types and spaces and all are compatible. All fields are taken from the same fact table Can some one please help me?Solved2.2KViews0likes2Comments