Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I need to calculate how many days gap each stock has until I see the first value, but I couldn't find a solution.
It has to take into account up to the first value it encounters.
Can you help me?
Thank you for your support.
To calculate the number of days until the first value for each stock, you can use a combination of DAX functions such as FILTER, MINX, and DATEDIFF. Try this:
Days Until First Value =
VAR FirstValueDate = MINX(FILTER(StockData, [Value] <> BLANK()), [Date])
RETURN IF(ISBLANK(FirstValueDate), BLANK(), DATEDIFF(StockData[Date], FirstValueDate, DAY))
Unfortunately it doesn't work.
User | Count |
---|---|
86 | |
81 | |
68 | |
63 | |
54 |
User | Count |
---|---|
120 | |
99 | |
91 | |
83 | |
65 |