Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a sample data with Survey waves (from 5 different time periods 1 to 5).
Need help in creating the below 3 columns highlighted in green.
1. Latest Wave column: Need to create a new column in Power BI using DAX. This should be based on "Maximum" value from Survey_Wave column. If true 1 or else 0.
2. Previous Wave column: Need to create a new column in Power BI using DAX. This should be based on "Maximum" value -1 from Survey_Wave column. If true 1 or else 0.
3. Last 3 waves columns: Need to create a new column in Power BI using DAX. This should be based on "Top 3" value from Survey_Wave column. If true 1 or else 0.
It is important to note that the code should be dynamic as the Survey_Wave column over time will get more values (6, 7 .... etc going forward in time)
Desired Result as below:
Pbix file link - Download here
Solved! Go to Solution.
Hi,
Here is one way to do this:
Data:
Dax:
End result:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
Here is one way to do this:
Data:
Dax:
End result:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |