Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How to show value per week

Hello guys, I am having a problem in my data model. I have two tables, Target and Calendar 

in the Target Table I have the Target Date that is a single day of the month for each month and it contains a value:



and in the Calendar table I have the days and week number:


Calendar and Target table are relationed by the date field. 

 



And then, I have a measure that sums the target value. My objective is to show the target value per week, but as you can see, I only have one day per month in my Target Table date field, and when I try to visualize the date per week in a table, it gets aggregated only in one week, as you can see below: 

 


How can I build a measure that be able to distribute the values per week?

 

  • Make sure your date fields are formatted as date in particular the 'Data Inicial'.  You can try this see if this fixes the issue.  Create a new column in your fMetas table refering to the Data inicial. Then join this column with your date table instead of directly from the data inicial column.

    DateValidation = DATE(
    YEAR(fMetas[Data Inicial])
    ,MONTH(fMetas[Data Inicial])
    ,DAY(fMetas[Data Inicial])
    )

1 Reply

  • Make sure your date fields are formatted as date in particular the 'Data Inicial'.  You can try this see if this fixes the issue.  Create a new column in your fMetas table refering to the Data inicial. Then join this column with your date table instead of directly from the data inicial column.

    DateValidation = DATE(
    YEAR(fMetas[Data Inicial])
    ,MONTH(fMetas[Data Inicial])
    ,DAY(fMetas[Data Inicial])
    )