The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello all. I am trying to solve what seems to be a difficult problem in DAX.
Below is the schema for the table that I am working within:
What I am attempting to do is capture when the status of a material changes from 0 to 1.
In an attempt to do so, I have created a calculated column that uses the DAX function of EARLIER( ) and this does the job except that the column captures all 0s preceding the status change. Please see the example below.
Note that the desired outcome is for the first row of the table under the "Stat Switch" column to be blank instead of containing a value of 0 because another entry (after the first record) is where the Switch / status change actually occurrs.
Any tips on how to achieve this result would be greatly appreciated!
Here is the link to the .pbix file
Solved! Go to Solution.
Please find solution
This solution worked! Thank you! Is there any to alter the logic so that if two records hold the same material and date and also have a status of "0", then one of those records would not be included in the calculated column?
Thanks again!
Please see the screenshot below for the specific example
Note that the intention is to either mark the first or the second row in the table above as 1 in "Column 2", not both.