Forum Discussion

ricardo_martins's avatar
ricardo_martins
Frequent Visitor
1 year ago
Solved

Last 4 years on table

Hi all, I'm trying to build what feels like a simple DAX measure — but clearly, it’s not as straightforward as it looks, because it’s driving me slightly insane. Goal: I need a measure that shows ...
  • johnt75's avatar
    1 year ago

    Not sure that I can make it clearer than SQLBI, but I'll try to explain the general principles.

    You need a second copy of the date table, because you want to be able to select a single year and yet display multiple years in the visual. So you select a single year from the main date table, and you can then use dates from the copy inside the visual to show the values that you want to.

    The main concept is that you take the value selected from the main date table and use that to generate the list of dates that you want to show in the copy table. The rest is about making sure that the list of dates in the copy table correctly filter the main fact table.

    I'd suggest that you watch the video, then read the article and let it sink in a bit. Watch the video again, and then try and copy the steps that Alberto details in the article and put them into your model. Also, download the sample file from the article and have a look at how it works in there.