Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, i am trying to compute for the value before the firstnonblankvalue. I am computing for Beginning Inventory of a particular model, my date looks like this:
Date Particulars Item Qty
9/30/2020 InvEnd Item 1 100
10/1/2020 InvEnd Item 1 90
10/31/2020 InvEnd Item 1 50
My filters based on Calendar date.
Since the ending inventory of a particular day will be the beginning inventory of the next day i didnt include a separate beginning inventory column. My current DAX on the beginning inventory looks like this ( for October Beginning Inventory)
Inv = FIRSTNONBLANKVALUE( 'Calendar'[Date] ,
Hi @jmcph ,
Sorry, not very clear.
Do you want to put the first non-blank value (100) in the Inventory table into the row of the day before the corresponding date in the calendar table?
FIRSTNONBLANKVALUE has already filtered out non-blank values, so if the value on September 30 is blank, it will continue to find the first non-blank value.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@jmcph , Try a new column like
new column =
calculate(lastnonblankvalue([Date], sum(Table[Qty])), filter(Table, [item] =earlier([item]) && [Date] <earlier([Date])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |