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 have a table with date headers like:
December 2021 | November 2021 | October 2021 | September 2021 |
next month headers will change to:
January 2022 | December 2021 | November 2021 | October 2021 |
Is there a way like a MAX() function that I call a column based on the latest date in the header?
Thank you!
Unpivot dataset, if possible.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
I did that.I have a viz that require latest month data from a column with date header. I'm curious to see if it is possible to 'query' headers. My background is with another less popular profuct that had the option.
Hi, @dandreev
Not fully sure what you want.
Can you share you sample file for further research?
Best Regards,
Community Support Team _ Eason
I'll try to explain.
DESCRPT | October 2021 | November 2021 | December 2021 |
Avalues | 276 | 319 | 192 |
Bvalues | 78 | 73 | 45 |
Cvalues | 198 | 246 | 147 |
Dvalues | 353 | 341 | 218 |
Headers are set to change every month with Power Query code:
#"Renamed PR_MO_ONE" = Table.RenameColumns(#"Renamed ",{{"PR_MO_ONE", Date.MonthName(Date.AddMonths(DateTime.LocalNow(),-1))&" "& Text.From(Date.Year(Date.AddMonths(DateTime.LocalNow(),-1)))}}),
#"Renamed PR_MO_TWO" = Table.RenameColumns(#"Renamed PR_MO_ONE",{{"PR_MO_TWO", Date.MonthName(Date.AddMonths(DateTime.LocalNow(),-2))&" "& Text.From(Date.Year(Date.AddMonths(DateTime.LocalNow(),-2)))}}),
#"Renamed PR_MO_THREE" = Table.RenameColumns(#"Renamed PR_MO_TWO",{{"PR_MO_THREE", Date.MonthName(Date.AddMonths(DateTime.LocalNow(),-3))&" "& Text.From(Date.Year(Date.AddMonths(DateTime.LocalNow(),-3)))}})
Let's say I have a barchart that should show values for last month and a line chart that excludes latest month based on headers.
If it is too confusing I'll just close the request.
Thank you!
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 |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |