Forum Discussion
Rolling 6 months
Hi, I need to calculate a dax measure for a matrix table.
The goal is to have a table with pipeline data for the next 6 months finance by each division which is the category the finance will be shown for.
However, on the same table I need to total anything which comes after that 6 months.
So I have a date table and Pipleline table with delivery date and financed amount
Is there a way to do this?
The picture is too small for me to read! But the current rolling 6 months I'm thinking should be:
Aug 2021
Sep 2021Oct 2021
Nov 2021
Dec 2021
Jan 2022
If you don't want the dates before the 1st of Aug (Current month) you can add the following to the statement:Calculated Column = VAR FutureMonth = IF(MONTH(TODAY()) > 6 , MONTH(TODAY())-6 , MONTH(TODAY()) + 6) VAR FutureYear = IF(MONTH(TODAY()) > 6 , YEAR(TODAY())+1 , YEAR(TODAY()) ) Return IF(Date Table[Date] < DATE(YEAR(TODAY()), MONTH(TODAY()) , 1) , BLANK() , IF(Date Table[Date] >= DATE(FutureYear, FutureMonth, 1) , "Rest of the Dates" , [month] ) )
Then put a visual level filter to remove the blank values from the visual!
20 Replies
- AnonymousNot applicable
Division
Out of date
6 months
Rest of the dates
Total
1
£1000
£5000
£7000
£1300
3
£1000
£5000
£7000
£1300
4
£1000
£5000
£7000
£1300
something like this but in power bi with the months above all columns
- AnonymousNot applicable
- tex628
Community Champion
Do you have a calendar table connected to your sales table?
/ J
- AnonymousNot applicable
Also need the 6 months to be shown as Jan Feb March April etc
- AnonymousNot applicable
Also in relation to this would anyone know why my dates are not in chronological order? Its wrong in my dates table and in my matrix
- AnonymousNot applicable
Also, Its actually not letting my sort the Rolling 6 months measure by the sort order I have. Maybe thats why I cant get it in order. Is there a way around this?
- AnonymousNot applicable
Hi Anonymous ,
If you are talking about sorting the matrix by specific column, I'm afraid it's not supported currently.
Best Regrads,
Jay