Forum Discussion

MStark's avatar
MStark
Helper III
11 months ago
Solved

Dynamic Headers in DAX

Hey all! Im working on a query and wondering how to get header dates to be dynamic. Right now Im summarizing columns with the actual date but need this to be updated to be dynamic so can just set ...
  • tayloramy's avatar
    tayloramy
    11 months ago

    Hi MStark

     

    What tools are you using? As far as I know DAX wasn't designed to be able to handle this and can't do it.  

    If this helps, please consider giving Kudos. If it solves your problem, mark it as the solution so others can find it faster.

     
  • ZhangKun's avatar
    10 months ago

    DAX queries cannot generate dynamic column headers. You can use alternative solutions:

    1. Filter rows for the last five days in Power Query. See the attached example for a simple example. (For testing, you'll need to manually set your computer's time, but remember to turn "Set Automatic Time" back on.)

    2. Use headers like "1 Day Ago" and "2 Days Ago."