March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everyone, I have a little question that I'm not sure why the formulas work like this. I have a measure that calculates Stock (In - Out). Here are the measures:
Solved! Go to Solution.
@Drakorv
In your 2nd Measure, you are using a measure named [Max]. Measures are always wrapped within the calculate function. This way, it always calculates the Maximum date overwriting the date column value.
In your 1st measure, MAX(Calendario[Date]) takes the outer row context from the visual on the date where no context transition happens.
Hope that made it clear.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi, @Drakorv
I am not sure about how your other measures look like, but I think,
the first measure -> it creates something like cumulate-total-pattern. because max(date) is inside the measure.
the second measure -> it calculates [stock] measure for all dates. because max(date) is coming from the outside of the measure and it is already defined as one date, which is the last date of all date table. And all date that is less than or equal to max(date) is same as all date table.
I hope I explained well.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Drakorv
In your 2nd Measure, you are using a measure named [Max]. Measures are always wrapped within the calculate function. This way, it always calculates the Maximum date overwriting the date column value.
In your 1st measure, MAX(Calendario[Date]) takes the outer row context from the visual on the date where no context transition happens.
Hope that made it clear.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |