Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello
I am very new to PowerBI so I apologise if the language I'm using doesn't align with the correct Power BI terms and this question may be very basic. I come from a research background and am more familiar with data management from a statistical analysis point of view.
I have data that is filtered by site and grouped timepoint that I want to summarise in a visualisation. The trouble that I'm having is that rather than displaying Timepoint on my visualisation (see image below), I want to display the latest date that the data within that timepoint was collected. From my reading I suspect that I need to create a new column using DAX to do this (maybe using multipe if/return statements?) but can't work out how to write the command.
Here is the example data:
Site | Timepoint | Date |
1 | 1 | 8/08/2023 |
1 | 1 | 8/08/2023 |
1 | 1 | 28/08/2023 |
1 | 2 | 13/09/2022 |
1 | 2 | 11/09/2022 |
1 | 2 | 5/09/2022 |
2 | 1 | 27/01/2022 |
2 | 1 | 20/02/2022 |
2 | 1 | 1/03/2022 |
2 | 2 | 15/09/2023 |
2 | 2 | 12/09/2023 |
2 | 2 | 11/09/2023 |
Here is what I *think* I need to solve my visualisation problem:
Site | Timepoint | Date | Latest Date |
1 | 1 | 8/08/2023 | 28/08/2023 |
1 | 1 | 8/08/2023 | 28/08/2023 |
1 | 1 | 28/08/2023 | 28/08/2023 |
1 | 2 | 13/09/2022 | 13/09/2023 |
1 | 2 | 11/09/2022 | 13/09/2023 |
1 | 2 | 5/09/2022 | 13/09/2023 |
2 | 1 | 27/01/2022 | 1/03/2023 |
2 | 1 | 20/02/2022 | 1/03/2023 |
2 | 1 | 1/03/2022 | 1/03/2023 |
2 | 2 | 15/09/2023 | 15/09/2023 |
2 | 2 | 12/09/2023 | 15/09/2023 |
2 | 2 | 11/09/2023 | 15/09/2023 |
Any advice about writing this DAX or alternative solutions would be very much appreciated!
Solved! Go to Solution.
Hi AngelaB,
I created the same output in a calculated column as shown in your second table using dax as shown below:
Prior to that, I created the calculated calendar table and created a relationship between the dimension table and the fact table.
I attach the link to the pbix file below:
Hi AngelaB,
I created the same output in a calculated column as shown in your second table using dax as shown below:
Prior to that, I created the calculated calendar table and created a relationship between the dimension table and the fact table.
I attach the link to the pbix file below:
Thank you so much and for such a quick reply! That has worked perfectly. Thank you also for the .pbix file; Your explanation was clear, but having the file made it very simple to follow.
What a great community 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |