Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

january month data

hiiii
i have this query to calculate percentage its woking correctly but i want to calculate this for january month data
 
 
30 divided by Count of count =
DIVIDE([30], COUNTA('Phone Call Data'[count]))
  • Anonymous 

     

    Try something like this.

     

    MeasureValue =
    CALCULATE (
        DIVIDE ( 30, COUNTA ( 'Phone Call Data'[count] ) ),
        MONTH ( 'Phone Call Data'[Month] ) = 1 // or 'Phone Call Data'[Month]="January"
    )

     

3 Replies

  • nandukrishnavs's avatar
    nandukrishnavs
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    Try something like this.

     

    MeasureValue =
    CALCULATE (
        DIVIDE ( 30, COUNTA ( 'Phone Call Data'[count] ) ),
        MONTH ( 'Phone Call Data'[Month] ) = 1 // or 'Phone Call Data'[Month]="January"
    )

     

  • Anonymous , based on date format you put a filter

    //Jan this year with date

    calculate(
    DIVIDE([30], COUNTA('Phone Call Data'[count])), eomonth('Phone Call Data'[Date],0)=eomonth(date(year(today()),1,1),0))

     

    calculate(
    DIVIDE([30], COUNTA('Phone Call Data'[count])), 'Phone Call Data'[Month] =1)

     

    calculate(
    DIVIDE([30], COUNTA('Phone Call Data'[count])), format('Phone Call Data'[Date],"mmm") ="Jan")


    calculate(
    DIVIDE([30], COUNTA('Phone Call Data'[count])), format('Phone Call Data'[Date],"mmm-yyyy") ="Jan-2020")


    calculate(
    DIVIDE([30], COUNTA('Phone Call Data'[count])), 'Phone Call Data'[Month Name] ="January")

  • Anonymous ,

    Try a below DAX:

    CALCULATE(DIVIDE([30], COUNTA('Phone Call Data'[count])),FILTER(DateTable,MONTH(DateTable[DateColumn])=1))