Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  how to get the total days per month per year

    Posted Oct 29, 2022 03:38 AM
    I have a fields with the following:
    transaction month: ex. 1,2,3,4,5,6,7...
    transaction year: 2019, 2020, 2021....
    how to get the total days for example:
    month: 1
    year: 2019
    total days: ???

    ------------------------------
    Ronie Soriano
    ------------------------------


  • 2.  RE: how to get the total days per month per year

    Posted Oct 31, 2022 07:19 AM
    Hi Ronie,

    Do you have a date table? If so (MyDate[Date]):

    Days in Month =
    CALCULATE(
        COUNTROWS( MyDates ) ,
            ALL( MyDates[Date] ) ,
                VALUES( MyDates[Month Year] ) )

    ([Month Year] is a column in my date table that has the year and the month in it.
    Hope that helps,


    ------------------------------
    Mark Wiley
    Senior Solutions Architect
    GraVoc
    OH
    ------------------------------