March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I need a help in showing the column headers in such a way that for example if I have data till Jan-2021 and I wanted to show the headers as Jan-2021 and Jan-2020.It should be changed on the data refresh.
Date |
1-jan-2020 |
1-dec-2020 |
1-jan-2021 |
3-jan-2021 |
OutPut:
Jan-2021 | Jan-2020 | |
Sales | ### | ## |
Thanks in advance,
Solved! Go to Solution.
Hi @Anonymous ,
Did you have a date table in your model? You can create a date table and create many to one relationship to fact table.
Dim_Date = ADDCOLUMNS(CALENDAR(DATE(2020,1,1),DATE(2021,12,31)),"month",FORMAT([Date],"mmm")&"-"&YEAR([Date]))
Then use month column as columns in matrix:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Anonymous ,
Did you have a date table in your model? You can create a date table and create many to one relationship to fact table.
Dim_Date = ADDCOLUMNS(CALENDAR(DATE(2020,1,1),DATE(2021,12,31)),"month",FORMAT([Date],"mmm")&"-"&YEAR([Date]))
Then use month column as columns in matrix:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous , one way is use time intelligence and this year vs last year same month, But that will not show month name
example with help from date table
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Previous year Month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-11,MONTH)))
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
@Anonymous , Assume you have a measure. Try a measure like( use calendar table marked as Date table)
measure =
calculate([meausre] ) + calculate([measure], dateadd('Date'[Date],-1,year))
In this case you should able to use month name as column in matrix
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |