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.
Please, your support. I am trying to obtain the value of the first day in this table. You always have 15 days and you want to obtain the value of the first day in one measure. I do it in the following way:
Thank you very much in advance.
Solved! Go to Solution.
Hi @Tux-CM ,
ALLSELECTED() just remove the column you specailed. For the context of each row in your matrix table when you add [Categoria] to this viausl, another filter affect this filter context of this row, so, please also remove the filter comes from [Categoria], like REMOVERFILTER('Quiebre_8S'[Categoria]) in var _date.
Or try this code:
measure =
VAR _date =
CALCULATE ( MIN ( 'Quiebre_8S'[Fecha] ), ALL () )
RETURN
CALCULATE (
[Prom Valorizado L2W],
FILTER ( ALLSELECTED ( 'Quiebre_8S'[Fecha] ), [Fecha] = _date )
)
Best Regards!
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could use TOPN to get the values for the earliest date, the basic idea would be
Val Min = SELECTCOLUMNS( TOPN(1, 'Table', 'Table'[Sort Column], ASC), "@val", 'Table'[Value Column] )
Hi,
The basic pattern for getting first values from visible dates is like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Hi @ValtteriN ,, the formula you provide me does not calculate correctly:
The formula that it provides me only works if it does not have several columns, that is why I use the following formula but it does not perform the correct calculation:
ValMin =CALCULATE(SUMX(ALLSELECTED(Quiebre_8S[Fecha]),[Prom Valorizado L2W]),Quiebre_8S[Ranking]=1)
Thanks in advance.
Hi @Tux-CM ,
ALLSELECTED() just remove the column you specailed. For the context of each row in your matrix table when you add [Categoria] to this viausl, another filter affect this filter context of this row, so, please also remove the filter comes from [Categoria], like REMOVERFILTER('Quiebre_8S'[Categoria]) in var _date.
Or try this code:
measure =
VAR _date =
CALCULATE ( MIN ( 'Quiebre_8S'[Fecha] ), ALL () )
RETURN
CALCULATE (
[Prom Valorizado L2W],
FILTER ( ALLSELECTED ( 'Quiebre_8S'[Fecha] ), [Fecha] = _date )
)
Best Regards!
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Tux-CM That seems quite odd,
What kind of aggregation do you use for [Stock_valorizado] in your example? I suspect that there might be more values for 19.2.2022 and for that reason the result returned is too large.
The easy way to troubleshoot these kind of measures is to comment out parts of the measure (e.g. here I check if the date returned in the variable is the correct one):
Proud to be a Super User!
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
8 | |
7 |