Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have a problem with previous month calculation. For the first date in the dataset, there is no previous month date visible. Therfore also no reporting period. For the next date in the dataset there is (2/1/2017). Therefore the graph does not show the right period for the first month, in this case it should be 2017-01. Does anyone have a solution? I am new into Power BI, so maybe the solution is very simple, but I don't see it right know
Thanks in advance!
Solved! Go to Solution.
Hi @Hyperchef1969,
According to your description and snapshot, I found period column not contains correspond date label '2017-01'.
Since 'period column' formula is based on 'previous month' column, I'd like to suggest you to modify 'previous month' column formula to shows correct result.(period column will follow that column to show formatted date label.)
BTW, I think you are use dateadd function to calculate previous month date, right?
If this is a case, current dateadd only calculate on existed date range, if it out of current date range, it will return blank.
You can use date function to calculate.
Sample:
previous month = DATE ( YEAR ( [Report_Date] ), MONTH ( [Report_Date] ) - 1, DAY ( [Report_Date] ) )
Regards,
Xiaoxin Sheng
Hi @Hyperchef1969,
According to your description and snapshot, I found period column not contains correspond date label '2017-01'.
Since 'period column' formula is based on 'previous month' column, I'd like to suggest you to modify 'previous month' column formula to shows correct result.(period column will follow that column to show formatted date label.)
BTW, I think you are use dateadd function to calculate previous month date, right?
If this is a case, current dateadd only calculate on existed date range, if it out of current date range, it will return blank.
You can use date function to calculate.
Sample:
previous month = DATE ( YEAR ( [Report_Date] ), MONTH ( [Report_Date] ) - 1, DAY ( [Report_Date] ) )
Regards,
Xiaoxin Sheng
User | Count |
---|---|
102 | |
90 | |
80 | |
71 | |
70 |
User | Count |
---|---|
114 | |
100 | |
97 | |
72 | |
71 |