Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Table with daily data from monthly information

I need to create the following table:

Date \ ID \ Daily Target
01/01/22 \ ID1 \ 3658
01/01/22 \ ID2 \ 8459
13/03/22 \ ID1 \3000

I already have a date table that I create with DAX and a query that results in a table with Daily Target for each month like this:
ID \ Month-year \ Daily Target
ID1 \ January-2022 \ 3658
ID2 \ January-2022 \ 8459
ID1 \ March-2022 \ 3000

Any ideas?

  • Anonymous's avatar
    Anonymous
    3 years ago

    I finally find a solution:
    Add a new column:
    Table.AddColumn(#"Columnas con nombre cambiado2", "Personalizado", each List.Dates([Month], Date.Day(Date.EndOfMonth([Month])), #duration(1, 0, 0, 0)))

     

     



    Then Expand:

     

2 Replies

  • Anonymous 

    you can try this to create the month-year column

    Column = FORMAT('Table'[Date],"mmmm")&"-"&year('Table'[Date])

  • Anonymous's avatar
    Anonymous
    Not applicable

    I finally find a solution:
    Add a new column:
    Table.AddColumn(#"Columnas con nombre cambiado2", "Personalizado", each List.Dates([Month], Date.Day(Date.EndOfMonth([Month])), #duration(1, 0, 0, 0)))

     

     



    Then Expand: