Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I would be glad if you could help me with this.
There are 9 date columns on my log table that refer to 9 process stages against a process number. There is also a summary table that records the current 'stage due date' and the tables are joined by task ID.
The stage due date matches only one of the other 9 process dates (which therefore indicates the current stage on that log table).
I want to be able to generate a column on the log table that automatically writes out the current stage (from column 'Stages').
For example, in the image below, for process number 40, the current stage is 'Pricing', and for process number 23, the current stage is 'Scope Acknowledgement'.
I want to be able to auto-generate this in another column.
Solved! Go to Solution.
Hi , @BJMaxwell
According to your description, you want to add a column to get the current stage by the 'due date' in the summary table.
I am not surely for the raw data in your side , This is my test data:
[1]If you want to add a calculated column in the LogTable , you can click "New Column" and enter this:
Column = var _due_date = RELATED('SuammaryTable'[stage due date])
var _t =FILTER('LogTable','LogTable'[task ID]=EARLIER('LogTable'[task ID]) && 'LogTable'[Date]=_due_date)
return
MAXX(_t,[Stage])
Then we can meet your need :
[2]If you want to add a measure, you can use this dax code:
Measure = var _due_date =MAX('SuammaryTable'[stage due date])
var _id = MAX('SuammaryTable'[task ID])
var _t = FILTER( ALLSELECTED('LogTable') , 'LogTable'[task ID]=_id && 'LogTable'[Date] = _due_date)
return
MAXX(_t ,[Stage])
Then we can put the measure on the visual and we can meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
The primary step should be to "Unpivot Other columns" in the Log table. Then depending whether you want a measure or a calculated column formula solution, you may use the RELATED()/RELATEDTABLE()/CALCULATE() function. To get specific help, share data that can be pasted in an MS Excel file and show the expected result.
Hi , @BJMaxwell
According to your description, you want to add a column to get the current stage by the 'due date' in the summary table.
I am not surely for the raw data in your side , This is my test data:
[1]If you want to add a calculated column in the LogTable , you can click "New Column" and enter this:
Column = var _due_date = RELATED('SuammaryTable'[stage due date])
var _t =FILTER('LogTable','LogTable'[task ID]=EARLIER('LogTable'[task ID]) && 'LogTable'[Date]=_due_date)
return
MAXX(_t,[Stage])
Then we can meet your need :
[2]If you want to add a measure, you can use this dax code:
Measure = var _due_date =MAX('SuammaryTable'[stage due date])
var _id = MAX('SuammaryTable'[task ID])
var _t = FILTER( ALLSELECTED('LogTable') , 'LogTable'[task ID]=_id && 'LogTable'[Date] = _due_date)
return
MAXX(_t ,[Stage])
Then we can put the measure on the visual and we can meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
91 | |
74 | |
64 | |
49 | |
36 |
User | Count |
---|---|
115 | |
86 | |
80 | |
58 | |
39 |